From: Marek Polacek Date: Thu, 20 Jun 2019 22:06:36 +0000 (+0000) Subject: re PR c++/68265 (Arbitrary syntactic nonsense silently accepted after 'int (*){}... X-Git-Tag: misc/cutover-git~4663 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c35f57c5bd2b7d3fcf04f7bb8134db43c5b31059;p=thirdparty%2Fgcc.git re PR c++/68265 (Arbitrary syntactic nonsense silently accepted after 'int (*){}' until the next close brace) PR c++/68265 * g++.dg/parse/error62.C: New test. From-SVN: r272525 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c6130e5eea25..48ca72f0e533 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-06-20 Marek Polacek + + PR c++/68265 + * g++.dg/parse/error62.C: New test. + 2019-06-20 Steven G. Kargl PR fortran/86587 diff --git a/gcc/testsuite/g++.dg/parse/error62.C b/gcc/testsuite/g++.dg/parse/error62.C new file mode 100644 index 000000000000..8dac0ffc0d58 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/error62.C @@ -0,0 +1,10 @@ +// PR c++/68265 + +int main() +{ + int (*) {} // { dg-error "expected primary-expression" } + any amount of syntactic nonsense // { dg-error "not declared in this scope" } + on multiple lines, with *punctuation* and ++operators++ even... + will be silently discarded + until the next close brace +}