1 // PR c++/88482 2 // { dg-do compile } 3 4 extern "C" int __cxa_throw (void *, void *, void (*) (void *)); // { dg-error "declared incorrectly" } 5 extern "C" void *__cxa_get_exception_ptr (void *); 6 extern "C" double __cxa_begin_catch (void *); // { dg-error "declared incorrectly" } 7 extern "C" long *__cxa_end_catch (); // { dg-error "declared incorrectly" } 8 extern "C" char __cxa_rethrow (); // { dg-error "declared incorrectly" } 9 extern "C" void __cxa_allocate_exception (__SIZE_TYPE__); // { dg-error "declared incorrectly" } 10 extern "C" void __cxa_free_exception (void *); 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; 19 try 20 { 21 if (x > 15) 22 throw S (); 23 } 24 catch (S s) 25 { 26 throw; 27 } 28 return x + 3; 29 } 30