From 58b45c4f3f5e83f3e3b7249eddd679c2c576e02e Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Tue, 27 Jun 2017 09:00:52 +0000 Subject: [PATCH] re PR c++/62046 (A catch in a class, without any try, compiles fine) 2017-06-27 Paolo Carlini PR c++/62046 * g++.dg/parse/catch2.C: New. From-SVN: r249682 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/parse/catch2.C | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 gcc/testsuite/g++.dg/parse/catch2.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index fecfd6211ae..901d4a53d85 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-06-27 Paolo Carlini + + PR c++/62046 + * g++.dg/parse/catch2.C: New. + 2017-06-27 Jakub Jelinek 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 index 00000000000..528d6c74125 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/catch2.C @@ -0,0 +1,4 @@ +// PR c++/62046 + +void foo() { } catch (...); // { dg-error "expected" } +class bar { void foo() { } catch (...); }; // { dg-error "expected" } -- 2.30.2