1 // PR c++/88482 2 // { dg-do compile } 3 4 extern "C" void __cxa_throw (void *, void *, void (*) (void *)); 5 int __cxa_get_exception_ptr; // { dg-message "previous declaration" } 6 extern "C" void *__cxa_begin_catch (void *) throw (); 7 extern "C" void __cxa_end_catch (); 8 extern "C" void __cxa_rethrow (); 9 extern "C" void *__cxa_allocate_exception (__SIZE_TYPE__) throw (); 10 int __cxa_free_exception; // { dg-message "previous declaration" } 11 12 struct S { S (); S (const S &); ~S (); }; 13 14 int foo(int x)15foo (int x) 16 { 17 if (x > 27) 18 throw 19; // { dg-error "redeclared" } 19 try 20 { 21 if (x > 15) 22 throw S (); 23 } 24 catch (S s) // { dg-error "redeclared" } 25 { 26 throw; 27 } 28 return x + 3; 29 } 30