mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-19 15:33:56 +00:00
Silence GCC warnings when using libc++ headers.
GCC 12 raises warnings about literal operator suffixes not preceded by '_' in libc++ headers such as <string_view> as it doesn't recognize libc++ headers being an implementation of the standard. GCC 12 also warns about clang-specific pragmas in <locale>. Disabling these warnings globally for all C++ code is not ideal, but is a better option than patching libc++ headers to ignore these warnings. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D37530
This commit is contained in:
parent
d00c20882f
commit
442295c1fe
@ -217,6 +217,14 @@ CWARNFLAGS+= -Wno-error=overflow
|
||||
.endif
|
||||
.endif
|
||||
|
||||
# GCC 12.1.0
|
||||
.if ${COMPILER_VERSION} >= 120100
|
||||
# These warnings are raised by headers in libc++ so are disabled
|
||||
# globally for all C++
|
||||
CXXWARNFLAGS+= -Wno-literal-suffix \
|
||||
-Wno-error=unknown-pragmas
|
||||
.endif
|
||||
|
||||
# GCC produces false positives for functions that switch on an
|
||||
# enum (GCC bug 87950)
|
||||
CWARNFLAGS+= -Wno-return-type
|
||||
|
Loading…
Reference in New Issue
Block a user