OSDN Git Service

2005-07-05 Paolo Carlini <pcarlini@suse.de>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / libsupc++ / typeinfo
index 336fcc0..8182422 100644 (file)
@@ -2,20 +2,20 @@
 // Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002
 // Free Software Foundation
 //
-// This file is part of GNU CC.
+// This file is part of GCC.
 //
-// GNU CC is free software; you can redistribute it and/or modify
+// GCC is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
 // the Free Software Foundation; either version 2, or (at your option)
 // any later version.
 // 
-// GNU CC is distributed in the hope that it will be useful,
+// 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.
 // 
 // You should have received a copy of the GNU General Public License
-// along with GNU CC; see the file COPYING.  If not, write to
+// along with GCC; see the file COPYING.  If not, write to
 // the Free Software Foundation, 59 Temple Place - Suite 330,
 // Boston, MA 02111-1307, USA.
 
  *  This header provides RTTI support.
  */
 
-#ifndef __TYPEINFO__
-#define __TYPEINFO__
+#ifndef _TYPEINFO
+#define _TYPEINFO
 
 #include <exception>
 
+#pragma GCC visibility push(default)
+
 extern "C++" {
 
 namespace __cxxabiv1
@@ -44,19 +46,24 @@ namespace __cxxabiv1
   class __class_type_info;
 } // namespace __cxxabiv1
 
-#if !__GXX_WEAK__
-  // If weak symbols are not supported, typeinfo names are not merged.
-  #define __GXX_MERGED_TYPEINFO_NAMES 0
-#else
-  // On platforms that support weak symbols, typeinfo names are merged.
-  #define __GXX_MERGED_TYPEINFO_NAMES 1
+#ifndef __GXX_MERGED_TYPEINFO_NAMES
+  #if !__GXX_WEAK__
+    // If weak symbols are not supported, typeinfo names are not merged.
+    #define __GXX_MERGED_TYPEINFO_NAMES 0
+  #else
+    // On platforms that support weak symbols, typeinfo names are merged.
+    #define __GXX_MERGED_TYPEINFO_NAMES 1
+  #endif
 #endif
 
 namespace std 
 {
-  /** The @c type_info class describes type information generated by
+  /**
+   *  @brief  Part of RTTI.
+   *
+   *  The @c type_info class describes type information generated by
    *  an implementation.
-   *  @brief Used in RTTI.  */
+  */
   class type_info 
   {
   public:
@@ -85,7 +92,7 @@ namespace std
     { return __name; }
 
 #if !__GXX_MERGED_TYPEINFO_NAMES
-    bool before(const type_info& arg) const;
+    bool before(const type_info& __arg) const;
     // In old abi, or when weak symbols are not supported, there can
     // be multiple instances of a type_info object for one
     // type. Uniqueness must use the _name value, not object address.
@@ -124,12 +131,17 @@ namespace std
                             void **__obj_ptr) const;
   };
 
-  /** If you attempt an invalid @c dynamic_cast expression, an instance of
+  /**
+   *  @brief  Thrown during incorrect typecasting.
+   *
+   *  If you attempt an invalid @c dynamic_cast expression, an instance of
    *  this class (or something derived from this class) is thrown.  */
   class bad_cast : public exception 
   {
   public:
     bad_cast() throw() { }
+    // This declaration is not useless:
+    // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118
     virtual ~bad_cast() throw();
   };
   
@@ -138,9 +150,13 @@ namespace std
   {
   public:
     bad_typeid () throw() { }
+    // This declaration is not useless:
+    // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118
     virtual ~bad_typeid() throw();
   };
 } // namespace std
 
+#pragma GCC visibility pop
+
 } // extern "C++"
 #endif