Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Mar 2014 19:31:33 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r263774 - in head: contrib/libstdc++/include/bits sbin/devd
Message-ID:  <201403261931.s2QJVXgt049099@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Wed Mar 26 19:31:33 2014
New Revision: 263774
URL: http://svnweb.freebsd.org/changeset/base/263774

Log:
  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

Modified:
  head/contrib/libstdc++/include/bits/cpp_type_traits.h
  head/sbin/devd/Makefile

Modified: head/contrib/libstdc++/include/bits/cpp_type_traits.h
==============================================================================
--- head/contrib/libstdc++/include/bits/cpp_type_traits.h	Wed Mar 26 17:43:24 2014	(r263773)
+++ head/contrib/libstdc++/include/bits/cpp_type_traits.h	Wed Mar 26 19:31:33 2014	(r263774)
@@ -80,6 +80,13 @@ _GLIBCXX_END_NAMESPACE
 
 _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
 {
   // NB: g++ can not compile these if declared within the class
@@ -398,6 +405,10 @@ namespace __detail
     };
 #endif
 
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
 _GLIBCXX_END_NAMESPACE
 
 #endif //_CPP_TYPE_TRAITS_H

Modified: head/sbin/devd/Makefile
==============================================================================
--- head/sbin/devd/Makefile	Wed Mar 26 17:43:24 2014	(r263773)
+++ head/sbin/devd/Makefile	Wed Mar 26 19:31:33 2014	(r263774)
@@ -13,7 +13,6 @@ LDADD=	-ll -lutil
 
 YFLAGS+=-v
 CFLAGS+=-I. -I${.CURDIR}
-CFLAGS.clang+=-Wno-keyword-compat
 
 CLEANFILES= y.output
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403261931.s2QJVXgt049099>