a tip for warning stompers
Robert Lipe
robertl@dgii.com
Thu Feb 12 01:55:00 GMT 1998
*This is absolutely the wrong way to do this. Do not check this in.*
Here's a tip for those working to reduce the number of problems we have
in EGCS by reducing the number of warnings: Just about every gcc source
file already includes config.h. Just about every file makes a call to
either error() or warning(). We don't seem to have a really good place
to prototype them.
For testing's sake, you can blow these two lines onto the end of config.h
and kill both the "implicit declaration" whining and get improved checking
for the format specifiers for those functions.
extern void error (char *fmt, ...)
__attribute__ ((format (printf,1,2)));
extern void warning (char *fmt, ...)
__attribute__ ((format (printf,1,2)));
Obviously, this is band-aid until we figure out the Right Way to address
this.
--
Robert Lipe http://www.dgii.com/people/robertl robertl@dgii.com
More information about the Gcc
mailing list