T.R | Title | User | Personal Name | Date | Lines |
---|
2110.1 | full example needed | DECC::VOGEL | | Mon Mar 03 1997 10:14 | 12 |
|
This error will be output if the type PENM_id_modl_t is not defined.
Are you certain that it is a defined type at line 14385?
Although PENM_id_modl_t is defined at line 14368, it could be
a macro which is #undefined before line 14385. There could also
be a compiler bug or some other problem I can't think of right now.
Could you post a small complete program that demonstrates the problem?
Ed
|
2110.2 | The type is not yet defined. | BALZAC::KUOCH | | Tue Mar 04 1997 03:58 | 84 |
| Ed,
Thank you for your quick reply.
You are right, the type is not yet defined when the error produces.
It took me a long time to understand the customer's source code :
a lot of .h and several mutually include each other.
I compile the same source with VMS and UNIX, the .LIS files has a little
difference : with VMS, there are the character "X" before the line number,
if the line is not really included :
-------------------------------------------------------------------------
.LIS under VMS :
I3X 21 typedef PXZ_sint8 PENM_id_modl_t;
I3X 22
I3X 23 #endif
I2 24
I2 25 extern int PENG_gpe_modl(int i1, PENM_id_modl_t modl_supt_f);
..................................1
%CC-E-PARMTYPLIST, (1) Ill-formed parameter type list.
-------------------------------------------------------------------------
.LIS under UNIX :
I3 21 typedef PXZ_sint8 PENM_id_modl_t;
I3 22
I3 23 #endif
I2 24
I2 25 extern int PENG_gpe_modl(int i1, PENM_id_modl_t modl_supt_f);
.................................1
(1) Error: Ill-formed parameter type list.
-------------------------------------------------------------------------
The following is a small program similar to the customer's code.
The compilations are :
cc/list/show=all main.c (VMS)
cc main.c -c main.o -show include -source_listing -migrate (UNIX)
Regards.
Cheu.
==============================================================================
/* main.c */
#include "mod.h"
main()
{
int a,b;
a = b;
}
------------------------------------------------------------------------------
/* mod.h */
#ifndef mod
#define mod /* allow only once include */
typedef signed char PXZ_sint8;
#include "grp.h"
typedef PXZ_sint8 PENM_id_modl_t;
#endif
-------------------------------------------------------------------------------
/* grp.h */
#ifndef GRP
#define GRP
#include "mod.h"
extern int PENG_gpe_modl(int i1, PENM_id_modl_t modl_supt_f);
/* 1st argument is necessary to produce "Ill-formed parameter type list." */
#endif
|
2110.3 | | DECCXL::WIBECAN | That's the way it is, in Engineering! | Tue Mar 04 1997 09:14 | 11 |
| main.c includes mod.h, which first prevents itself from being re-included, next
defines PXZ_sint8, then includes grp.h. grp.h includes mod.h, and nothing is
pulled in due to the #ifndef MOD guard. Then grp.h uses PENM_id_modl_t, which
is not defined yet. Upon leaving grp.h, mod.h defines PENM_id_modl_t, but this
is after the first attempted use.
Moving the typedef of PENM_id_modl_t up before the inclusion of grp.h in mod.h
should fix the problem. The only reason to have it later is if there is
something in grp.h that must NOT have that definition, which is unlikely.
Brian
|
2110.4 | What version of UNIX? | DECC::VOGEL | | Tue Mar 04 1997 09:15 | 12 |
|
Cheu,
The C compiler that ships with V4.0 of Digital UNIX should produce
listing files with the 'X' in the margin. Is it true that you are
using an earlier version of Digital UNIX?
I agree that this 'X' can be a very helpful aid.
Ed
|
2110.5 | OK with DIGITAL UNIX V4.0 | SEGUR::KUOCH | | Tue Mar 04 1997 10:08 | 13 |
| Ed, Brian,
Thank you for your helps.
Yes, I compiled with DIGITAL UNIX V3.2D-1 (3.2 41), DEC C V5.0-106
OpenVMS AXP V6.2, DEC C V5.0-003
With DIGITAL UNIX V4.0 464, DEC C V5.2-030, I get the character "X"
in the margin.
Regards.
Cheu.
|