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



   Date: Tue, 09 Mar 1999 15:20:06 +1100
   From: Andrew Cagney <ac131313@cygnus.com>

   > cc: "../../gdb-4.17.85/gdb/remote.c", line 3046: \
   >     error 1711: Inconsistent parameter list declaration for "remote_query".
   >

       static int remote_query PARAMS ((char, char *, char *, int *));

   and:

       static int
       remote_query (query_type, buf, outbuf, bufsiz)
	    char query_type;
	    char *buf;
	    char *outbuf;
	    int *bufsiz;

   This time I've no idea's as to what HP's ansic doesn't like about it.  Any
   suggestions?

The actual problem is that the function definition is "K&R style" not
true ANSI, but in any case the right solution is to change the first
arg from "char" to "int".  While there may be situations where you
really need an argument to be declared "char", in 20 years of C
programming I've only seen one case (certain Mac Toolbox calls) where
having a char arg was important, and dozens of cases where it just
made problems for no good reason.

(This one is a little embarassing, because I went over the remote_query
code, and missed it...)

								Stan