[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 5a4fcaed 2/2: Begin adapting to gcc-12
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 5a4fcaed 2/2: Begin adapting to gcc-12 |
Date: |
Thu, 18 Aug 2022 13:06:59 -0400 (EDT) |
branch: master
commit 5a4fcaed7309f5d4caee3443538ceb3edf0e119b
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Begin adapting to gcc-12
---
compiler_gcc_warnings.make | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/compiler_gcc_warnings.make b/compiler_gcc_warnings.make
index 752d414a..857f29c6 100644
--- a/compiler_gcc_warnings.make
+++ b/compiler_gcc_warnings.make
@@ -44,6 +44,18 @@ else ifneq (,$(filter $(gcc_version), 11 11.0))
-Wenum-conversion \
-Winvalid-imported-macros \
+else ifneq (,$(filter $(gcc_version), 12 12.0))
+
+# g++-11 warnings not recognized by g++-10
+# [also consider any new warnings added in gcc-12]
+
+ gcc_version_specific_cxx_warnings := \
+ -Wctad-maybe-unsupported \
+ -Wdeprecated-enum-enum-conversion \
+ -Wdeprecated-enum-float-conversion \
+ -Wenum-conversion \
+ -Winvalid-imported-macros \
+
endif
# Write '-Wno' options at the end, with a rationale here.
@@ -249,6 +261,19 @@ wno_sign_conv_objects := \
$(wno_sign_conv_objects): gcc_common_extra_warnings += -Wno-sign-conversion
+# gcc-12 gives spurious warnings when <regex> is used. See:
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105562
+# For lmi, this seems to affect only UBSAN builds.
+
+wno_maybe_uninitialized_objects := \
+ my_prod.o \
+ pdf_command_wx.o \
+ wx_test_about_version.o \
+
+ifeq (ubsan,$(build_type))
+ $(wno_maybe_uninitialized_objects): gcc_common_extra_warnings +=
-Wno-maybe-uninitialized
+endif
+
# Keep version-specific warnings last, so that they override others.
C_WARNINGS = \