OSDN Git Service

* lib/g++-dg.exp (g++-dg-test): Add "repo" option.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.eh / spec1.C
index 73ee960..0ff8883 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-do run  }
 // Testing exception specifications.
 // Test 1: the original exception succeeds.
 
@@ -8,15 +9,15 @@ void my_term ()  { exit (1); }
 void my_unexp () { throw 42; }
 
 void
-f () throw (char, int, bad_exception)
+f () throw (char, int, std::bad_exception)
 {
   throw 'a';
 }
 
-main ()
+int main ()
 {
-  set_terminate (my_term);
-  set_unexpected (my_unexp);
+  std::set_terminate (my_term);
+  std::set_unexpected (my_unexp);
 
   try
     {
@@ -30,7 +31,7 @@ main ()
     {
       return 3;
     }
-  catch (bad_exception)
+  catch (std::bad_exception)
     {
       return 4;
     }