Re: Upgrade "may not respond to" warning to error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux