-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Clang should err, not warn, on unrecognized warning options #10073
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Sure; I'll send a patch to cfe-commits for discussion soon. It was originally made a warning a while back, and it's probably about time to revisit that decision. |
Any news on this? |
Oops, sorry, lost track of this one; sent an email for real now. |
I am ready to take this one up if its not fixed yet. Shall I? I am a newbie so I don't know what the procedure for taking ownership of a bug is or the procedure for submitting a fix to one. |
Any news on this? |
Still present, as of |
Still present as of git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174843 91177308-0d34-0410-b5e6-96231b3b80d8 |
You can use -Werror=unknown-warning-option As of 3.1, the ordering of -Werror=unknown-warning-option and the "bad" command line arguments doesn't matter. See the XORG_TESTSET_CFLAG macro at http://cgit.freedesktop.org/xorg/util/macros/tree/xorg-macros.m4.in |
This is a bit better with r191249: $ clang -HHH -c test.c clang still thinks it knows all the -f* options (for example), so we are still not as strict as gcc. |
[cxx-interop] Workaround a template instantiation issue
Extended Description
Many open source projects, including Wine, pass various warning flags to the compiler to see if they're supported, expecting the compiler to return a non-zero status if they aren't.
Clang, on the other hand, only warns when it receives an unrecognized warning option. The warning is very annoying, particularly when compiling large numbers of source files, because it clutters the output. We believe the Clang should err (and thus return a non-zero status) instead of warn on warning options that aren't recognized.
We wanted to use -Werror, but Wine's maintainer told us to file a bug here instead.
The text was updated successfully, but these errors were encountered: