i386.c warnings cleanup
Jeffrey A Law
law@cygnus.com
Tue Feb 10 00:53:00 GMT 1998
In message < 199802100349.WAA07459@subrogation.cygnus.com >you write:
> Date: Tue, 10 Feb 1998 04:15:43 +0100
> From: Marc Lehmann <pcg@goof.com>
>
> +extern void error PVPROTO((char *s, ...));
> +extern int atoi PROTO((char *));
> +extern void bcopy PROTO((void *, void *, int n));
> +extern void set_float_handler PROTO((jmp_buf));
> +extern void free PROTO((void *));
>
> It's safest to never declare system functions, but to instead get the
> declarations from system header files. That's because on old systems
> you can't predict how the functions will be declared. For example,
> the SunOS <stdlib.h> declares free as returning int.
>
> You should instead simply include the correct header files, and trust
> them.
Agreed. And if a prototype is absolutely necessary then you
make it conditional on NEED_DECLARATION_xxxxx
jeff
More information about the Gcc
mailing list