OSDN Git Service

PR 24840
[pf3gnuchains/gcc-fork.git] / gcc / unwind-pe.h
index ce7d694..8cd3fcd 100644 (file)
@@ -24,8 +24,8 @@
 
    You should have received a copy of the GNU General Public License
    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.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.  */
 
 /* @@@ Really this should be out of line, but this also causes link
    compatibility problems with the base ABI.  This is slightly better
 #ifndef GCC_UNWIND_PE_H
 #define GCC_UNWIND_PE_H
 
+/* If using C++, references to abort have to be qualified with std::.  */
+#if __cplusplus
+#define __gxx_abort std::abort
+#else
+#define __gxx_abort abort
+#endif
+
 /* Pointer encodings, from dwarf2.h.  */
 #define DW_EH_PE_absptr         0x00
 #define DW_EH_PE_omit           0xff
@@ -79,9 +86,8 @@ size_of_encoded_value (unsigned char encoding)
       return 4;
     case DW_EH_PE_udata8:
       return 8;
-    default:
-      gcc_unreachable ();
     }
+  __gxx_abort ();
 }
 
 #endif
@@ -112,9 +118,8 @@ base_of_encoded_value (unsigned char encoding, struct _Unwind_Context *context)
       return _Unwind_GetDataRelBase (context);
     case DW_EH_PE_funcrel:
       return _Unwind_GetRegionStart (context);
-    default:
-      gcc_unreachable ();
     }
+  __gxx_abort ();
 }
 
 #endif
@@ -251,7 +256,7 @@ read_encoded_value_with_base (unsigned char encoding, _Unwind_Ptr base,
          break;
 
        default:
-         gcc_unreachable ();
+         __gxx_abort ();
        }
 
       if (result != 0)