This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project. See the GDB home page for more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: More gdb-4.17.85 testresults


> > cc: "../../gdb-4.17.85/gdb/remote.c", line 693: \
> >     error 1711: Inconsistent parameter list declaration for "pack_hex_byte".
> 
> This one puzzles me.  Looking in remote.c I see:
> 
>     static char *pack_hex_byte PARAMS ((char *pkt, unsigned char byte));
> 
> and then:
> 
>     static char *
>     pack_hex_byte (pkt, byte)
>          char *pkt;
>          unsigned char byte;
>     {
> 
>Is this error because HP's compiler doesn't like the `unsigned char' parameter?

Yes, in both cases. 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

-- 
Todd Whitesel
toddpw @ wrs.com