Operating System - HP-UX
1755143 Members
3084 Online
108830 Solutions
New Discussion юеВ

Inconsistent Parameter List : C Program

 
Soumen Ghosh_1
Occasional Advisor

Inconsistent Parameter List : C Program

Hello,

What does the error : 'Inconsistent Parameter List' mean?
We are compiling C programs on HP-UX 11.0 using HP-UX provided C compiler.

Please help.
Thanks in advance.

Soumen Ghosh
4 REPLIES 4
Jim Marsden
Occasional Advisor

Re: Inconsistent Parameter List : C Program

Hi

What error number are you getting with this message? Are you able to post a code snippet of the relevant function?
There are ten kinds of people in this world, those that understand binary - and those that don't.
Ceesjan van Hattum
Esteemed Contributor

Re: Inconsistent Parameter List : C Program

Hi,

HP's compiler doesn't like the `unsigned char' parameters.

This is a pedanticism of the HP compiler; it considers
the prototype to have ANSI argument conventions (char and unsigned char
really are only 8 bits) but it considers the definition to have K&R argument
conventions (char and unsigned char are implicitly promoted to int).

Most compilers recognize this case and accept it as a K&R->ANSI transition
tool, but the HP/UX compiler insists that the two prototypes are not the
same and rejects it.

Solutions:
- widen the chars to ints
- move to ANSI prototypes
- disable PARAMS() on that host until ANSIfication proceeds

Regards,
Ceesjan
Thanks to Todd Whitesel for his tribute in http://sources.redhat.com/
Soumen Ghosh_1
Occasional Advisor

Re: Inconsistent Parameter List : C Program

Hello,

This is like :

void itoa ( long, char* );

Error No. is 1711

Any idea is appreciated.

Soumen Ghosh

Re: Inconsistent Parameter List : C Program

Maybe the function declaration in the header file does not match the implementation in the source file?

Also, try adding the variable names to the type designators.

Also, maybe you have itoa() declared / defined somewhere else in your source code? This is a common function name with implementations available in various C runtime libraries, maybe the compiler is confusing your definition with another one it gets from another header file.