[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::decc

Title:DECC
Notice:General DEC C discussions
Moderator:TLE::D_SMITHNTE
Created:Fri Nov 13 1992
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2212
Total number of notes:11045

2110.0. ""Ill-formed parameter type list" ?" by BALZAC::KUOCH () Mon Mar 03 1997 09:11

    The following code is extracted from a listing file after a compilation :
...... 
I6   14368 extern peNM_desc_modl_ts *penM_desc_modl(PENM_id_modl_t id_modl_f);
I6   14369
I6   14370 extern int penM_init_ctxt(int prem_modl_fi);
I6   14371
......
......
I5   14384
I5   14385 extern PENG_id_gpe_t PENG_gpe_modl(
           PENG_id_hgpe_t hgpe_appt_f, PENM_id_modl_t modl_supt_f);
           ............................1

(1) Error: Ill-formed parameter type list.
  

    What means "Error: Ill-formed parameter type list." ?

    I thought that the problem is "PENM_id_modl_t", hower there is not problem
    at line 14368, and I verified that it is declared.      

Regards.
Cheu.
    
T.RTitleUserPersonal
Name
DateLines
2110.1full example neededDECC::VOGELMon Mar 03 1997 10:1412
    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.2The type is not yet defined.BALZAC::KUOCHTue Mar 04 1997 03:5884
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.3DECCXL::WIBECANThat's the way it is, in Engineering!Tue Mar 04 1997 09:1411
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.4What version of UNIX?DECC::VOGELTue Mar 04 1997 09:1512
    
    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.5OK with DIGITAL UNIX V4.0SEGUR::KUOCHTue Mar 04 1997 10:0813
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.