From 38dc3bf2c52f205177fabe17bed42b6e8c5b7c7c Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Tue, 16 Nov 2021 15:10:05 -0500 Subject: [PATCH] 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. --- build/jam/ArchitectureRules | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build/jam/ArchitectureRules b/build/jam/ArchitectureRules index 69cee62fd6..1c94e1715b 100644 --- a/build/jam/ArchitectureRules +++ b/build/jam/ArchitectureRules @@ -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 ;