On 2014-09-23 21:28, behanw@xxxxxxxxxxxxxxxxxx wrote:2 kinds of options: flags and warnings. clang used to merely warn about unused/unsupported flags/warnings. It now returns errors for unknown flags, but not warnings (unless you specify -Werror).
From: Mark Charlebois <charlebm@xxxxxxxxx>You mean unknown options, right?
Clang will warn about unknown warnings but will not return false
I can do that. Will fix.unless -Werror is set. GCC will return false if an unknownCan you please limit it to the clang case? Add an internal variable that
warning is passed.
Adding -Werror make both compiler behave the same.
either contains -Werror or nothing, depending on the compiler.
What IA valid concern for sure.
fear is that if we use -Werror unconditionally and the user (or some
automated build system) decides to add some silly option to KCFLAGS, we
will get silent failures in the cc-option tests.
BTW, is there a chance that this would be fixed in some later clangAgain, clang does error out on unknown compiler flags (as opposed to warnings).
version? Accepting unknown commandline options is a rather unusual
behavior. How are all the ./configure scripts going to cope with it?