Skip to content

Commit

Permalink
Disable warnings triggered in libc++15 with Clang 16
Browse files Browse the repository at this point in the history
After upgrading LLVM we get the following error:
`keyword '__make_signed' will be made available as an identifier for the remainder of the translation unit [-Werror,-Wkeyword-compat]`
This will be fixed once libc++ is upgraded to version 16, but this commit
can be cherry-picked back to older release branches.
  • Loading branch information
arichardson authored and bsdjhb committed Aug 3, 2024
1 parent c540d0f commit b14e5ea
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions share/mk/bsd.sys.mk
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,14 @@ CWARNFLAGS+= -Wno-system-headers
CWARNFLAGS+= -Wno-error=pass-failed
.endif

.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 160000
# Work around warnings in libc++15 when built with Clang 16+.
# This has to be here rather than scoped to libc++ since it is
# triggered in headers used by (almost) all C++ programs.
# FIXME: Remove this once libc++ has been upgraded.
CXXWARNFLAGS+=-Wno-keyword-compat
.endif

# How to handle FreeBSD custom printf format specifiers.
.if ${COMPILER_TYPE} == "clang" || \
(${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 120100)
Expand Down

0 comments on commit b14e5ea

Please sign in to comment.