[PATCH] Fix -Wattribute-alias option

Bernd Edlinger bernd.edlinger@hotmail.de
Sat Jan 19 10:06:00 GMT 2019


Hi,

the command line option -Wattribute-alias (w/o the "=1") is currently broken,
and only -Wno-attribute-alias is still working, but what is worse, is that
the #pragma GCC diagnostic fails to recognize the string "-Wattribute-alias",
as it used to do in gcc-8, which breaks the linux warning suppression macro
because it relies on a _Pragma to work.

Fixed by declaring -Wattribute-alias as an alias to -Wattribute-alias=1
and the negated form as an alias to -Wattribute-alias=0.

Bootstrapped and reg-tested on x86_64-pc-linux-gnu.
Is it OK for trunk?

Additionally I looked into the linux 4.20 build, got a couple "-Wmissing-attributes"
which seem easy to fix (by adding the cold attribute) and quite a lot
"-Waddress-of-packed-member" warnings, which I don't know how to fix properly.


Thanks
Bernd.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-fix-wattribute-alias.diff
Type: text/x-patch
Size: 2026 bytes
Desc: patch-fix-wattribute-alias.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190119/b087895c/attachment.bin>


More information about the Gcc-patches mailing list