re PR c++/62046 (A catch in a class, without any try, compiles fine)
authorPaolo Carlini <paolo.carlini@oracle.com>
Tue, 27 Jun 2017 09:00:52 +0000 (09:00 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 27 Jun 2017 09:00:52 +0000 (09:00 +0000)
2017-06-27  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/62046
* g++.dg/parse/catch2.C: New.

From-SVN: r249682

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/parse/catch2.C [new file with mode: 0644]

index fecfd6211ae260bd372c5349b401eb78330fb917..901d4a53d85213f7756031f91a69428b1d64e876 100644 (file)
@@ -1,3 +1,8 @@
+2017-06-27  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/62046
+       * g++.dg/parse/catch2.C: New.
+
 2017-06-27  Jakub Jelinek  <jakub@redhat.com>
 
        PR sanitizer/81209
diff --git a/gcc/testsuite/g++.dg/parse/catch2.C b/gcc/testsuite/g++.dg/parse/catch2.C
new file mode 100644 (file)
index 0000000..528d6c7
--- /dev/null
@@ -0,0 +1,4 @@
+// PR c++/62046
+
+void foo() { } catch (...);  // { dg-error "expected" }
+class bar { void foo() { } catch (...); };  // { dg-error "expected" }