1404b540aSrobert // -fno-exceptions Support -*- C++ -*- 2404b540aSrobert 3404b540aSrobert // Copyright (C) 2001, 2003 Free Software Foundation, Inc. 4404b540aSrobert // 5404b540aSrobert // This file is part of the GNU ISO C++ Library. This library is free 6404b540aSrobert // software; you can redistribute it and/or modify it under the 7404b540aSrobert // terms of the GNU General Public License as published by the 8404b540aSrobert // Free Software Foundation; either version 2, or (at your option) 9404b540aSrobert // any later version. 10404b540aSrobert 11404b540aSrobert // This library is distributed in the hope that it will be useful, 12404b540aSrobert // but WITHOUT ANY WARRANTY; without even the implied warranty of 13404b540aSrobert // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14404b540aSrobert // GNU General Public License for more details. 15404b540aSrobert 16404b540aSrobert // You should have received a copy of the GNU General Public License along 17404b540aSrobert // with this library; see the file COPYING. If not, write to the Free 18404b540aSrobert // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19404b540aSrobert // USA. 20404b540aSrobert 21404b540aSrobert // As a special exception, you may use this file as part of a free software 22404b540aSrobert // library without restriction. Specifically, if other files instantiate 23404b540aSrobert // templates or use macros or inline functions from this file, or you compile 24404b540aSrobert // this file and link it with other files to produce an executable, this 25404b540aSrobert // file does not by itself cause the resulting executable to be covered by 26404b540aSrobert // the GNU General Public License. This exception does not however 27404b540aSrobert // invalidate any other reasons why the executable file might be covered by 28404b540aSrobert // the GNU General Public License. 29404b540aSrobert 30404b540aSrobert // 31404b540aSrobert // ISO C++ 14882: 19.1 Exception classes 32404b540aSrobert // 33404b540aSrobert 34404b540aSrobert /** @file exception_defines.h 35404b540aSrobert * This is a Standard C++ Library header. 36404b540aSrobert */ 37404b540aSrobert 38404b540aSrobert #ifndef _EXCEPTION_DEFINES_H 39404b540aSrobert #define _EXCEPTION_DEFINES_H 1 40404b540aSrobert 41404b540aSrobert #ifndef __EXCEPTIONS 42404b540aSrobert // Iff -fno-exceptions, transform error handling code to work without it. 43404b540aSrobert # define try if (true) 44404b540aSrobert # define catch(X) if (false) 45*93eb8ef5Sespie # define __throw_exception_again ((void)0) 46404b540aSrobert #else 47404b540aSrobert // Else proceed normally. 48404b540aSrobert # define __throw_exception_again throw 49404b540aSrobert #endif 50404b540aSrobert 51404b540aSrobert #endif 52