diff mbox

[v3] Avoid a few spurious fails when testing in C++0x mode

Message ID 4D542427.4070500@oracle.com
State New
Headers show

Commit Message

Paolo Carlini Feb. 10, 2011, 5:45 p.m. UTC
Hi,

committed to mainline.

Paolo.

////////////////
2011-02-10  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/23_containers/multimap/modifiers/erase/47628.cc: Do
	not test in C++0x mode.
	* testsuite/23_containers/map/modifiers/erase/47628.cc: Likewise.
	* testsuite/20_util/headers/utility/synopsis.cc: Tweak to work
	in C++0x mode too.
diff mbox

Patch

Index: testsuite/23_containers/multimap/modifiers/erase/47628.cc
===================================================================
--- testsuite/23_containers/multimap/modifiers/erase/47628.cc	(revision 170011)
+++ testsuite/23_containers/multimap/modifiers/erase/47628.cc	(working copy)
@@ -33,13 +33,14 @@ 
   bool operator<(const Key&) const;
 };
 
-typedef std::multimap<Key, int> MMap;
-
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
 // libstdc++/47628
 void f()
 {
+  typedef std::multimap<Key, int> MMap;
   MMap mm;
   mm.insert(MMap::value_type());
   MMap::iterator i = mm.begin();
   mm.erase(i);
 }
+#endif
Index: testsuite/23_containers/map/modifiers/erase/47628.cc
===================================================================
--- testsuite/23_containers/map/modifiers/erase/47628.cc	(revision 170011)
+++ testsuite/23_containers/map/modifiers/erase/47628.cc	(working copy)
@@ -33,13 +33,14 @@ 
   bool operator<(const Key&) const;
 };
 
-typedef std::map<Key, int> Map;
-
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
 // libstdc++/47628
 void f()
 {
+  typedef std::map<Key, int> Map;
   Map m;
   m.insert(Map::value_type());
   Map::iterator i = m.begin();
   m.erase(i);
 }
+#endif
Index: testsuite/20_util/headers/utility/synopsis.cc
===================================================================
--- testsuite/20_util/headers/utility/synopsis.cc	(revision 170011)
+++ testsuite/20_util/headers/utility/synopsis.cc	(working copy)
@@ -1,6 +1,6 @@ 
 // { dg-do compile }
 
-// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -31,15 +31,15 @@ 
   //  lib.pairs, pairs:
   template <class T1, class T2> struct pair;
   template <class T1, class T2>
-  bool operator==(const pair<T1,T2>&, const pair<T1,T2>&);
+  _GLIBCXX_CONSTEXPR bool operator==(const pair<T1,T2>&, const pair<T1,T2>&);
   template <class T1, class T2>
-  bool operator< (const pair<T1,T2>&, const pair<T1,T2>&);
+  _GLIBCXX_CONSTEXPR bool operator< (const pair<T1,T2>&, const pair<T1,T2>&);
   template <class T1, class T2>
-  bool operator!=(const pair<T1,T2>&, const pair<T1,T2>&);
+  _GLIBCXX_CONSTEXPR bool operator!=(const pair<T1,T2>&, const pair<T1,T2>&);
   template <class T1, class T2>
-  bool operator> (const pair<T1,T2>&, const pair<T1,T2>&);
+  _GLIBCXX_CONSTEXPR bool operator> (const pair<T1,T2>&, const pair<T1,T2>&);
   template <class T1, class T2>
-  bool operator>=(const pair<T1,T2>&, const pair<T1,T2>&);
+  _GLIBCXX_CONSTEXPR bool operator>=(const pair<T1,T2>&, const pair<T1,T2>&);
   template <class T1, class T2>
-  bool operator<=(const pair<T1,T2>&, const pair<T1,T2>&);
+  _GLIBCXX_CONSTEXPR bool operator<=(const pair<T1,T2>&, const pair<T1,T2>&);
 }