Discussion:
testing for certain compiler options does not work
Add Reply
Marc Dietrich
2017-11-29 13:16:36 UTC
Reply
Permalink
Raw Message
Hi,

just found that my gcc 'gcc (SUSE Linux) 7.2.1 20171020 [gcc-7-branch revision
253932]' does not warn when using the negative form of unsupported warning
options. So all the configure tests for such options erroneously succeed, e.g:

gcc -Wno-bob test.c # works fine

gcc -Walice test.c # warns for unsupported compiler option

Maybe gcc bug or intended behaviour, maybe only unique to my version?

Marc
Ian Romanick
2017-12-06 20:21:53 UTC
Reply
Permalink
Raw Message
Post by Marc Dietrich
Hi,
just found that my gcc 'gcc (SUSE Linux) 7.2.1 20171020 [gcc-7-branch revision
253932]' does not warn when using the negative form of unsupported warning
gcc -Wno-bob test.c # works fine
gcc -Walice test.c # warns for unsupported compiler option
Maybe gcc bug or intended behaviour, maybe only unique to my version?
At least 6.4.1 does not have this problem, but our checks must be broken
in a different way. I see piles of

cc1: warning: unrecognized command line option ‘-Wno-initializer-overrides’

This probably explains why I see piles of

cc1: warning: unrecognized command line option ‘-Wno-initializer-overrides’

in my builds.
Post by Marc Dietrich
Marc
_______________________________________________
mesa-dev mailing list
https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Marc Dietrich
2017-12-07 10:15:13 UTC
Reply
Permalink
Raw Message
Hi Ian,
Post by Ian Romanick
Post by Marc Dietrich
Hi,
just found that my gcc 'gcc (SUSE Linux) 7.2.1 20171020 [gcc-7-branch
revision 253932]' does not warn when using the negative form of
unsupported warning options. So all the configure tests for such options
gcc -Wno-bob test.c # works fine
gcc -Walice test.c # warns for unsupported compiler option
Maybe gcc bug or intended behaviour, maybe only unique to my version?
At least 6.4.1 does not have this problem, but our checks must be broken
in a different way. I see piles of
I just found that this is not a gcc bug but a feature (since 4.4), so this
should also happen with your compiler:

https://gcc.gnu.org/wiki/FAQ#wnowarning
Post by Ian Romanick
cc1: warning: unrecognized command line option ‘-Wno-initializer-
overrides’

this should not happen, because this is the clang option which fails with gcc.
Is this with meson or autotools? Are you sure you applied the patch? I tested
it with both, gcc and clang and it works file here.
Post by Ian Romanick
This probably explains why I see piles of
cc1: warning: unrecognized command line option ‘-Wno-initializer-
overrides’
Post by Ian Romanick
in my builds.
Ian Romanick
2017-12-11 18:21:08 UTC
Reply
Permalink
Raw Message
Post by Marc Dietrich
Hi Ian,
Post by Ian Romanick
Post by Marc Dietrich
Hi,
just found that my gcc 'gcc (SUSE Linux) 7.2.1 20171020 [gcc-7-branch
revision 253932]' does not warn when using the negative form of
unsupported warning options. So all the configure tests for such options
gcc -Wno-bob test.c # works fine
gcc -Walice test.c # warns for unsupported compiler option
Maybe gcc bug or intended behaviour, maybe only unique to my version?
At least 6.4.1 does not have this problem, but our checks must be broken
in a different way. I see piles of
I just found that this is not a gcc bug but a feature (since 4.4), so this
https://gcc.gnu.org/wiki/FAQ#wnowarning
Post by Ian Romanick
cc1: warning: unrecognized command line option ‘-Wno-initializer-
overrides’
this should not happen, because this is the clang option which fails with gcc.
Is this with meson or autotools? Are you sure you applied the patch? I tested
it with both, gcc and clang and it works file here.
This was without your patch. I didn't test your patch. :) To answer
the other question, I've recently been seeing this with meson, but I
believe I also saw it with autotools.
Post by Marc Dietrich
Post by Ian Romanick
This probably explains why I see piles of
cc1: warning: unrecognized command line option ‘-Wno-initializer-
overrides’
Post by Ian Romanick
in my builds.
Loading...