This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Upgrade "may not respond to" warning to error
- From: Eljay Love-Jensen <eljay at adobe dot com>
- To: Scott Lamb <slamb at slamb dot org>, gcc-help at gcc dot gnu dot org
- Date: Mon, 30 Aug 2004 07:08:51 -0500
- Subject: Re: Upgrade "may not respond to" warning to error
- References: <2ECF1286-F94D-11D8-8E7F-000A95891440@slamb.org>
Hi Scott,
>What's the flag for this message?
I'm not sure. (I haven't familiarized myself with Objective-C. Which is
ironic, since I'm an OS X person.)
Refer to ...
http://gcc.gnu.org/onlinedocs/gcc-3.4.1/gcc/Objective-C-Dialect-Options.html
http://gcc.gnu.org/onlinedocs/gcc-3.4.1/gcc/Warning-Options.html
>Is it possible to do something like -Werror on just some warnings?
No. It's possible to doing something similar, using one of three different
strategies:
1) edit the GCC source code and make the identified warnings
errors. Rebuild your custom GCC.
2) post-process the output (using sed, for instance) and "upgrade" warnings
to errors. Not quite the same thing, doesn't abort the compile, but may be
"good enough". You can use that in conjunction with grep to detect for the
upgraded warnings, and abort a make file by returning a failing error code.
3) have your build process perform two passes. The first pass enables all
the warnings you want to see, the second pass enable only the warnings you
want to be elevated to errors and turn on the -Werror flag.
Those are just a few ideas off the top of my head.
HTH,
--Eljay