Build: enable mismatched-tags warning for CLANG
Disabled for GCC as this causes a crash which isn't practical to workaround, details in code-comments.
This commit is contained in:
parent
77695da84b
commit
4fd8f6c575
@ -1784,13 +1784,22 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
|||||||
CXX_WARN_NO_SUGGEST_OVERRIDE -Wno-suggest-override
|
CXX_WARN_NO_SUGGEST_OVERRIDE -Wno-suggest-override
|
||||||
CXX_WARN_UNINITIALIZED -Wuninitialized
|
CXX_WARN_UNINITIALIZED -Wuninitialized
|
||||||
|
|
||||||
|
# NOTE(@ideasman42): In GCC 13.2.1 on Linux this causes internal compiler errors.
|
||||||
|
# The crashes can be resolved by disabling the flag per module (but not via pragmas).
|
||||||
|
# However this also causes a type mix-up FreeStyle (Blender & FreeStyle's `Curve`)
|
||||||
|
# so it seems to impact GCC's the internal state enough that it's too risky to enable.
|
||||||
|
# Once this flag has been removed for the modules where this occurs.
|
||||||
|
# When this is resolved the check can be enabled for fixed GCC versions.
|
||||||
|
#
|
||||||
|
# Prevents linking errors with MSVC.
|
||||||
|
# `CXX_WARN_MISMATCHED_TAGS -Wmismatched-tags`
|
||||||
|
|
||||||
# Useful but too many false positives and inconvenient to suppress each occurrence.
|
# Useful but too many false positives and inconvenient to suppress each occurrence.
|
||||||
CXX_WARN_NO_STRINGOP_OVERREAD -Wno-stringop-overread
|
CXX_WARN_NO_STRINGOP_OVERREAD -Wno-stringop-overread
|
||||||
CXX_WARN_NO_STRINGOP_OVERFLOW -Wno-stringop-overflow
|
CXX_WARN_NO_STRINGOP_OVERFLOW -Wno-stringop-overflow
|
||||||
|
|
||||||
# Use `[[fallthrough]]` or `ATTR_FALLTHROUGH` macro to suppress.
|
# Use `[[fallthrough]]` or `ATTR_FALLTHROUGH` macro to suppress.
|
||||||
CXX_WARN_IMPLICIT_FALLTHROUGH -Wimplicit-fallthrough=5
|
CXX_WARN_IMPLICIT_FALLTHROUGH -Wimplicit-fallthrough=5
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# causes too many warnings
|
# causes too many warnings
|
||||||
@ -1893,6 +1902,9 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
|||||||
CXX_WARN_UNDEF_PREFIX -Wundef-prefix
|
CXX_WARN_UNDEF_PREFIX -Wundef-prefix
|
||||||
CXX_WARN_UNUSED_PARAMETER -Wunused-parameter
|
CXX_WARN_UNUSED_PARAMETER -Wunused-parameter
|
||||||
|
|
||||||
|
# Prevents linking errors with MSVC.
|
||||||
|
CXX_WARN_MISMATCHED_TAGS -Wmismatched-tags
|
||||||
|
|
||||||
# Gives too many unfixable warnings.
|
# Gives too many unfixable warnings.
|
||||||
# `C_WARN_UNUSED_MACROS -Wunused-macros`
|
# `C_WARN_UNUSED_MACROS -Wunused-macros`
|
||||||
# `CXX_WARN_UNUSED_MACROS -Wunused-macros`
|
# `CXX_WARN_UNUSED_MACROS -Wunused-macros`
|
||||||
|
Loading…
Reference in New Issue
Block a user