eh_aux_runtime.cc revision 132720
1169699Skan// -*- C++ -*- Common throw conditions. 2169699Skan// Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 390292Sobrien// Free Software Foundation 4132727Skan// 590292Sobrien// This file is part of GCC. 6132727Skan// 790292Sobrien// GCC is free software; you can redistribute it and/or modify 890292Sobrien// it under the terms of the GNU General Public License as published by 990292Sobrien// the Free Software Foundation; either version 2, or (at your option) 1090292Sobrien// any later version. 11132727Skan// 1290292Sobrien// GCC is distributed in the hope that it will be useful, 1390292Sobrien// but WITHOUT ANY WARRANTY; without even the implied warranty of 1490292Sobrien// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1590292Sobrien// GNU General Public License for more details. 1690292Sobrien// 17132727Skan// You should have received a copy of the GNU General Public License 18169699Skan// along with GCC; see the file COPYING. If not, write to 19169699Skan// the Free Software Foundation, 59 Temple Place - Suite 330, 2090292Sobrien// Boston, MA 02111-1307, USA. 2190292Sobrien 2290292Sobrien// As a special exception, you may use this file as part of a free software 2390292Sobrien// library without restriction. Specifically, if other files instantiate 2490292Sobrien// templates or use macros or inline functions from this file, or you compile 2590292Sobrien// this file and link it with other files to produce an executable, this 2690292Sobrien// file does not by itself cause the resulting executable to be covered by 2790292Sobrien// the GNU General Public License. This exception does not however 2890292Sobrien// invalidate any other reasons why the executable file might be covered by 2990292Sobrien// the GNU General Public License. 3090292Sobrien 3152212Sobrien#include "typeinfo" 3252212Sobrien#include "exception" 3352212Sobrien#include <cstdlib> 3452212Sobrien#include "unwind-cxx.h" 3552212Sobrien#include "exception_defines.h" 3652212Sobrien 3718334Speterextern "C" void 3818334Speter__cxa_bad_cast () 3918334Speter{ 4018334Speter#ifdef __EXCEPTIONS 4152212Sobrien throw std::bad_cast(); 4252212Sobrien#else 4318334Speter std::abort(); 4418334Speter#endif 4518334Speter} 4618334Speter 4718334Speterextern "C" void 4818334Speter__cxa_bad_typeid () 4918334Speter{ 5018334Speter#ifdef __EXCEPTIONS 5118334Speter throw std::bad_typeid(); 5218334Speter#else 5318334Speter std::abort(); 5418334Speter#endif 5518334Speter} 5618334Speter 57110621Skan