public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch] libstdc++/61269 fix <type_traits> for clang
@ 2014-05-21 15:10 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2014-05-21 15:10 UTC (permalink / raw)
  To: libstdc++, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 97 bytes --]

Fix a dumb thinko in my recent <type_traits> changes.

Tested x86_64-linux, committed to trunk.


[-- Attachment #2: patch.txt --]
[-- Type: text/x-patch, Size: 3361 bytes --]

commit 2611cfac77420816ad312bcfd211f0899a697880
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed May 21 14:40:55 2014 +0100

    	PR libstdc++/61269
    	* include/std/type_traits: Move include outside namespace std.
    	* testsuite/20_util/declval/requirements/1_neg.cc: Adjust dg-error.
    	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Likewise.
    	* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
    	Likewise.

diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits
index 0eacd36..1ff2e62 100644
--- a/libstdc++-v3/include/std/type_traits
+++ b/libstdc++-v3/include/std/type_traits
@@ -37,19 +37,22 @@
 
 #include <bits/c++config.h>
 
-namespace std _GLIBCXX_VISIBILITY(default)
-{
-_GLIBCXX_BEGIN_NAMESPACE_VERSION
-
 #ifdef _GLIBCXX_USE_C99_STDINT_TR1
 # if defined (__UINT_LEAST16_TYPE__) && defined(__UINT_LEAST32_TYPE__)
+namespace std
+{
   typedef __UINT_LEAST16_TYPE__ uint_least16_t;
   typedef __UINT_LEAST32_TYPE__ uint_least32_t;
+}
 # else
 #  include <cstdint>
 # endif
 #endif
 
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
   /**
    * @defgroup metaprogramming Metaprogramming
    * @ingroup utilities
diff --git a/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc b/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc
index 6be3af0..04e6b71 100644
--- a/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc
@@ -19,7 +19,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-error "static assertion failed" "" { target *-*-* } 2033 }
+// { dg-error "static assertion failed" "" { target *-*-* } 2036 }
 
 #include <utility>
 
diff --git a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
index 77f8bb3..d711546 100644
--- a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
@@ -48,5 +48,5 @@ void test01()
 // { dg-error "required from here" "" { target *-*-* } 40 }
 // { dg-error "required from here" "" { target *-*-* } 42 }
 
-// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1744 }
-// { dg-error "declaration of" "" { target *-*-* } 1708 }
+// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1747 }
+// { dg-error "declaration of" "" { target *-*-* } 1711 }
diff --git a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc
index 48ee225..c77205b 100644
--- a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc
@@ -48,5 +48,5 @@ void test01()
 // { dg-error "required from here" "" { target *-*-* } 40 }
 // { dg-error "required from here" "" { target *-*-* } 42 }
 
-// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1647 }
-// { dg-error "declaration of" "" { target *-*-* } 1611 }
+// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1650 }
+// { dg-error "declaration of" "" { target *-*-* } 1614 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-05-21 15:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-21 15:10 [patch] libstdc++/61269 fix <type_traits> for clang Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).