mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 18:59:37 +00:00
Revert r263694, and apply a better fix to squelch unnecessary warnings
from clang about possible keywords being treated as identifiers for the remainder of the translation unit (a.k.a. -Wkeyword-compat), when using libstdc++ in combination with -Wsystem-headers. This will not only fix devd, but any C++ program using libstdc++. MFC after: 3 days X-MFC-With: r263694
This commit is contained in:
parent
db52b17caa
commit
d8bb143013
@ -80,6 +80,13 @@ _GLIBCXX_END_NAMESPACE
|
|||||||
|
|
||||||
_GLIBCXX_BEGIN_NAMESPACE(std)
|
_GLIBCXX_BEGIN_NAMESPACE(std)
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
|
// When using clang, suppress warnings about possible keywords (such as
|
||||||
|
// __is_void, __is_pod, etc) being used as identifiers.
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wkeyword-compat"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace __detail
|
namespace __detail
|
||||||
{
|
{
|
||||||
// NB: g++ can not compile these if declared within the class
|
// NB: g++ can not compile these if declared within the class
|
||||||
@ -398,6 +405,10 @@ namespace __detail
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
_GLIBCXX_END_NAMESPACE
|
_GLIBCXX_END_NAMESPACE
|
||||||
|
|
||||||
#endif //_CPP_TYPE_TRAITS_H
|
#endif //_CPP_TYPE_TRAITS_H
|
||||||
|
@ -13,7 +13,6 @@ LDADD= -ll -lutil
|
|||||||
|
|
||||||
YFLAGS+=-v
|
YFLAGS+=-v
|
||||||
CFLAGS+=-I. -I${.CURDIR}
|
CFLAGS+=-I. -I${.CURDIR}
|
||||||
CFLAGS.clang+=-Wno-keyword-compat
|
|
||||||
|
|
||||||
CLEANFILES= y.output
|
CLEANFILES= y.output
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user