]> gcc.gnu.org Git - gcc.git/commitdiff
* g++.old-deja/g++.eh/catch1.C: New test.
authorNathan Sidwell <nathan@gcc.gnu.org>
Tue, 8 Jun 1999 05:31:07 +0000 (05:31 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Tue, 8 Jun 1999 05:31:07 +0000 (05:31 +0000)
From-SVN: r27425

gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.eh/catch1.C [new file with mode: 0644]

index 55bbc92c560ce1fd985882b76eb73e33d2232bee..3bd0fb98fe7403c913ffff6aaf13a60243773853 100644 (file)
@@ -1,3 +1,7 @@
+ 1999-06-08  Nathan Sidwell  <nathan@acm.org>
+
+       * g++.old-deja/g++.eh/catch1.C: New test.
+
 Mon Jun  7 23:39:16 1999  Jeffrey A Law  (law@cygnus.com)
 
        * g++.old-deja/g++.mike/p6610a.C: Expect failure on freebsd-elf.
diff --git a/gcc/testsuite/g++.old-deja/g++.eh/catch1.C b/gcc/testsuite/g++.old-deja/g++.eh/catch1.C
new file mode 100644 (file)
index 0000000..052be5f
--- /dev/null
@@ -0,0 +1,18 @@
+// Build don't link:
+// 
+// Copyright (C) 1999 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 6 Jun 1999 <nathan@acm.org>
+
+// We cannot catch an incomplete type, or ptr to one
+
+struct A; // ERROR - forward decl
+
+void fn()
+{
+  try {}
+  catch (A *p) {} // ERROR - undefined type
+  try {}
+  catch (A p) {}  // ERROR - undefined type
+  try {}
+  catch (void const *p) {}  // ok
+}
This page took 0.181624 seconds and 5 git commands to generate.