@@ -82,6 +82,7 @@ if(NOT _YACMACompilerLinkerSettingsRun)
82
82
# Configuration bits specific for GCC.
83
83
if (YACMA_COMPILER_IS_GNUCXX)
84
84
_YACMA_CHECK_ENABLE_CXX_FLAG(-fdiagnostics-color=auto)
85
+ _YACMA_CHECK_ENABLE_CXX_FLAG(-Woverloaded-virtual)
85
86
# New in GCC 9.
86
87
_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Waddress-of-packed-member)
87
88
endif ()
@@ -109,7 +110,6 @@ if(NOT _YACMACompilerLinkerSettingsRun)
109
110
_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wc99-designator)
110
111
_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wreorder-init-list)
111
112
_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wsizeof-pointer-div)
112
- _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wsizeof-array-div)
113
113
_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wxor-used-as-pow)
114
114
_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wfinal-dtor-non-final-class)
115
115
# New warnings in clang 11.
@@ -122,13 +122,31 @@ if(NOT _YACMACompilerLinkerSettingsRun)
122
122
# NOTE: this is a new flag in Clang 13 which seems to give
123
123
# incorrect warnings for UDLs.
124
124
_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wno-reserved-identifier)
125
+ _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Warray-bounds-pointer-arithmetic)
126
+ # New warnings in clang 14.
127
+ _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Warray-parameter)
128
+ # NOTE: clang 17 enables by default a new compiler flag called "-fassume-unique-vtables":
129
+ #
130
+ # https://releases.llvm.org/17.0.1/tools/clang/docs/ReleaseNotes.html#c-language-changes
131
+ #
132
+ # This flag however seems to be buggy:
133
+ #
134
+ # https://github.com/llvm/llvm-project/issues/71196
135
+ #
136
+ # On our part, in several projects we are experiencing Boost.serialization failures when
137
+ # (de)serialising derived objects through pointers to bases. Thus, we forcibly disable
138
+ # this new flag.
139
+ _YACMA_CHECK_ENABLE_CXX_FLAG(-fno-assume-unique-vtables)
125
140
endif ()
126
141
127
142
# Common configuration for GCC, clang and Intel.
128
143
if (YACMA_COMPILER_IS_CLANGXX OR YACMA_COMPILER_IS_INTELXX OR YACMA_COMPILER_IS_GNUCXX)
129
144
_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wall)
130
145
_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wextra)
131
- _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wnon-virtual-dtor)
146
+ # NOTE: this flag has been superseded by "-Wdelete-non-virtual-dtor"
147
+ # (enabled by "-Wall"). See:
148
+ # https://gcc.gnu.org/pipermail/gcc-cvs/2022-November/374730.html
149
+ # _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wnon-virtual-dtor)
132
150
# NOTE: this flag is a bit too chatty, let's disable it for the moment.
133
151
#_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wnoexcept)
134
152
_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wlogical-op)
0 commit comments