ArchitectureRules: Add two new -Wno-error flags.

The use of the "register" keyword is harmless, though we should eventually
remove it.

Taking addresses of packed members is "mostly harmless" on x86 where
unaligned accesses are OK. It's less harmless on other architectures,
but we sometimes use packed structures when manually aligning things.
Unfortunately GCC throws this warning even when the actual pointer would
be aligned, not merely when it's unaligned, making the warning far too
noisy and not really that useful.

"Found" by GCC 11.
This commit is contained in:
Augustin Cavalier
2021-11-16 15:10:05 -05:00
parent ae7d733d42
commit 38dc3bf2c5
+3 -1
View File
@@ -123,7 +123,9 @@ rule ArchitectureSetup architecture
# TODO: Remove all these.
HAIKU_WERROR_FLAGS_$(architecture) += -Wno-error=unused-but-set-variable
-Wno-error=deprecated -Wno-error=deprecated-declarations
-Wno-error=cpp -Wno-error=trigraphs ;
-Wno-error=cpp -Wno-error=trigraphs -Wno-error=register ;
# These currently generate too many "false positives."
HAIKU_WERROR_FLAGS_$(architecture) += -Wno-error=address-of-packed-member ;
# But these can stay.
HAIKU_WERROR_FLAGS_$(architecture) += -Wno-error=cast-align
-Wno-error=format-truncation ;