* Upgrade "may not respond to" warning to error
@ 2004-08-30 6:44 Scott Lamb
2004-08-30 16:01 ` Eljay Love-Jensen
0 siblings, 1 reply; 2+ messages in thread
From: Scott Lamb @ 2004-08-30 6:44 UTC (permalink / raw)
To: gcc-help
[-- Attachment #1: Type: text/plain, Size: 560 bytes --]
I'd like to have warnings like this:
someFile.m:XXX:warning: `SomeObjcClass' may not respond to
`-someMessage:'
become errors, while not affecting other warnings. So I have two
questions:
1) What's the flag for this message? I see -Wundeclared-selector, but
that seems to be a slightly different case.
2) Is it possible to do something like -Werror on just some warnings?
I'd like some other types of warnings (say, the signedness ones) to be
just warnings. I want to see them, but I don't want them to cause
compilation to fail.
Thanks,
Scott
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 186 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Upgrade "may not respond to" warning to error
2004-08-30 6:44 Upgrade "may not respond to" warning to error Scott Lamb
@ 2004-08-30 16:01 ` Eljay Love-Jensen
0 siblings, 0 replies; 2+ messages in thread
From: Eljay Love-Jensen @ 2004-08-30 16:01 UTC (permalink / raw)
To: Scott Lamb, gcc-help
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-08-30 12:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-30 6:44 Upgrade "may not respond to" warning to error Scott Lamb
2004-08-30 16:01 ` Eljay Love-Jensen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).