summaryrefslogtreecommitdiff
path: root/libstdc++-v3/libsupc++
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/libsupc++')
-rw-r--r--libstdc++-v3/libsupc++/cxxabi.h6
-rw-r--r--libstdc++-v3/libsupc++/exception25
-rw-r--r--libstdc++-v3/libsupc++/nested_exception.h4
-rw-r--r--libstdc++-v3/libsupc++/tinfo.cc3
-rw-r--r--libstdc++-v3/libsupc++/tinfo2.cc3
-rw-r--r--libstdc++-v3/libsupc++/typeinfo9
6 files changed, 28 insertions, 22 deletions
diff --git a/libstdc++-v3/libsupc++/cxxabi.h b/libstdc++-v3/libsupc++/cxxabi.h
index 834e434e1e1..18861609040 100644
--- a/libstdc++-v3/libsupc++/cxxabi.h
+++ b/libstdc++-v3/libsupc++/cxxabi.h
@@ -582,7 +582,7 @@ namespace __cxxabiv1
/** @namespace abi
* @brief The cross-vendor C++ Application Binary Interface. A
* namespace alias to __cxxabiv1, but user programs should use the
- * alias `abi'.
+ * alias 'abi'.
*
* A brief overview of an ABI is given in the libstdc++ FAQ, question
* 5.8 (you may have a copy of the FAQ locally, or you can view the online
@@ -594,10 +594,10 @@ namespace __cxxabiv1
* along with the current specification.
*
* For users of GCC greater than or equal to 3.x, entry points are
- * available in <cxxabi.h>, which notes, <em>"It is not normally
+ * available in <cxxabi.h>, which notes, <em>'It is not normally
* necessary for user programs to include this header, or use the
* entry points directly. However, this header is available should
- * that be needed."</em>
+ * that be needed.'</em>
*/
namespace abi = __cxxabiv1;
diff --git a/libstdc++-v3/libsupc++/exception b/libstdc++-v3/libsupc++/exception
index be7dec69ab7..989a9ff6f74 100644
--- a/libstdc++-v3/libsupc++/exception
+++ b/libstdc++-v3/libsupc++/exception
@@ -10,12 +10,12 @@
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3, or (at your option)
// any later version.
-//
+//
// GCC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
@@ -38,7 +38,7 @@
extern "C++" {
-namespace std
+namespace std
{
/**
* @defgroup exceptions Exceptions
@@ -56,7 +56,7 @@ namespace std
* your own %exception classes, or use a different hierarchy, or to
* throw non-class data (e.g., fundamental types).
*/
- class exception
+ class exception
{
public:
exception() throw() { }
@@ -69,7 +69,7 @@ namespace std
/** If an %exception is thrown which is not listed in a function's
* %exception specification, one of these may be thrown. */
- class bad_exception : public exception
+ class bad_exception : public exception
{
public:
bad_exception() throw() { }
@@ -102,15 +102,16 @@ namespace std
* violates the function's %exception specification. */
void unexpected() __attribute__ ((__noreturn__));
- /** [18.6.4]/1: "Returns true after completing evaluation of a
+ /** [18.6.4]/1: 'Returns true after completing evaluation of a
* throw-expression until either completing initialization of the
* exception-declaration in the matching handler or entering @c unexpected()
* due to the throw; or after entering @c terminate() for any reason
* other than an explicit call to @c terminate(). [Note: This includes
- * stack unwinding [15.2]. end note]"
+ * stack unwinding [15.2]. end note]'
*
- * 2: "When @c uncaught_exception() is true, throwing an %exception can
- * result in a call of @c terminate() (15.5.1)."
+ * 2: 'When @c uncaught_exception() is true, throwing an
+ * %exception can result in a call of @c terminate()
+ * (15.5.1).'
*/
bool uncaught_exception() throw() __attribute__ ((__pure__));
@@ -119,10 +120,10 @@ namespace std
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
- /**
+ /**
* @brief A replacement for the standard terminate_handler which
* prints more information about the terminating exception (if any)
- * on stderr.
+ * on stderr.
*
* @ingroup exceptions
*
@@ -138,7 +139,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
void __verbose_terminate_handler();
_GLIBCXX_END_NAMESPACE
-
+
} // extern "C++"
#pragma GCC visibility pop
diff --git a/libstdc++-v3/libsupc++/nested_exception.h b/libstdc++-v3/libsupc++/nested_exception.h
index 752c595b49b..d4e1347114b 100644
--- a/libstdc++-v3/libsupc++/nested_exception.h
+++ b/libstdc++-v3/libsupc++/nested_exception.h
@@ -57,9 +57,9 @@ namespace std
public:
nested_exception() throw() : _M_ptr(current_exception()) { }
- nested_exception(const nested_exception&) throw() = default;
+ nested_exception(const nested_exception&) = default;
- nested_exception& operator=(const nested_exception&) throw() = default;
+ nested_exception& operator=(const nested_exception&) = default;
virtual ~nested_exception() = default;
diff --git a/libstdc++-v3/libsupc++/tinfo.cc b/libstdc++-v3/libsupc++/tinfo.cc
index 1ce6f8f46ab..d939a3fdab7 100644
--- a/libstdc++-v3/libsupc++/tinfo.cc
+++ b/libstdc++-v3/libsupc++/tinfo.cc
@@ -41,7 +41,8 @@ operator== (const std::type_info& arg) const
#if __GXX_MERGED_TYPEINFO_NAMES
return name () == arg.name ();
#else
- return (&arg == this) || (__builtin_strcmp (name (), arg.name ()) == 0);
+ return (&arg == this)
+ || (name ()[0] != '*' && (__builtin_strcmp (name (), arg.name ()) == 0));
#endif
}
diff --git a/libstdc++-v3/libsupc++/tinfo2.cc b/libstdc++-v3/libsupc++/tinfo2.cc
index 4b01037f3b9..0182c6cc0de 100644
--- a/libstdc++-v3/libsupc++/tinfo2.cc
+++ b/libstdc++-v3/libsupc++/tinfo2.cc
@@ -37,7 +37,8 @@ type_info::before (const type_info &arg) const
#if __GXX_MERGED_TYPEINFO_NAMES
return name () < arg.name ();
#else
- return __builtin_strcmp (name (), arg.name ()) < 0;
+ return (name ()[0] == '*') ? name () < arg.name ()
+ : __builtin_strcmp (name (), arg.name ()) < 0;
#endif
}
diff --git a/libstdc++-v3/libsupc++/typeinfo b/libstdc++-v3/libsupc++/typeinfo
index 4c470430def..f7f9d4e2cc2 100644
--- a/libstdc++-v3/libsupc++/typeinfo
+++ b/libstdc++-v3/libsupc++/typeinfo
@@ -94,7 +94,7 @@ namespace std
/** Returns an @e implementation-defined byte string; this is not
* portable between compilers! */
const char* name() const
- { return __name; }
+ { return __name[0] == '*' ? __name + 1 : __name; }
#if !__GXX_TYPEINFO_EQUALITY_INLINE
// In old abi, or when weak symbols are not supported, there can
@@ -110,12 +110,15 @@ namespace std
// we can run into cases where type_info names aren't merged,
// so we still need to do string comparison.
bool before(const type_info& __arg) const
- { return __builtin_strcmp (__name, __arg.__name) < 0; }
+ { return (__name[0] == '*' && __arg.__name[0] == '*')
+ ? __name < __arg.__name
+ : __builtin_strcmp (__name, __arg.__name) < 0; }
bool operator==(const type_info& __arg) const
{
return ((__name == __arg.__name)
- || __builtin_strcmp (__name, __arg.__name) == 0);
+ || (__name[0] != '*' &&
+ __builtin_strcmp (__name, __arg.__name) == 0));
}
#else
// On some targets we can rely on type_info's NTBS being unique,