Hi,

straightforward update of the _GLIBCXX_NOTHROW macro. Without changing anything else, on x86_64-linux it provides the following small but measurable improvements to the size of the .so and the .a:

    .so: 6223484 -> 6223156
    .a: 15183284 -> 15182676

Tested x86_64-linux, committed.

Thanks,
Paolo.

/////////////////

2011-05-24  Paolo Carlini  <paolo.carl...@oracle.com>

        * include/bits/c++config (_GLIBCXX_NOTHROW): Update for noexcept.
        * testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error
        line number.

Index: include/bits/c++config
===================================================================
--- include/bits/c++config      (revision 174105)
+++ include/bits/c++config      (working copy)
@@ -52,10 +52,9 @@
 # define _GLIBCXX_NORETURN __attribute__ ((__noreturn__))
 #endif
 
+// See below for C++
 #ifndef _GLIBCXX_NOTHROW
-# ifdef __cplusplus
-#  define _GLIBCXX_NOTHROW throw()
-# else
+# ifndef __cplusplus
 #  define _GLIBCXX_NOTHROW __attribute__((__nothrow__))
 # endif
 #endif
@@ -110,6 +109,10 @@
 # endif
 #endif
 
+#ifndef _GLIBCXX_NOTHROW
+# define _GLIBCXX_NOTHROW _GLIBCXX_USE_NOEXCEPT
+#endif
+
 // Macro for extern template, ie controling template linkage via use
 // of extern keyword on template declaration. As documented in the g++
 // manual, it inhibits all implicit instantiations and is used
Index: testsuite/ext/profile/mutex_extensions_neg.cc
===================================================================
--- testsuite/ext/profile/mutex_extensions_neg.cc       (revision 174105)
+++ testsuite/ext/profile/mutex_extensions_neg.cc       (working copy)
@@ -25,4 +25,4 @@
 
 #include <vector>
 
-// { dg-error "multiple inlined namespaces" "" { target *-*-* } 252 }
+// { dg-error "multiple inlined namespaces" "" { target *-*-* } 255 }

Reply via email to