This funny one got fixed by r258549. Tested x86_64-linux, applying to trunk.
2019-06-20 Marek Polacek <pola...@redhat.com> PR c++/68265 * g++.dg/parse/error62.C: New test. diff --git gcc/testsuite/g++.dg/parse/error62.C gcc/testsuite/g++.dg/parse/error62.C new file mode 100644 index 00000000000..8dac0ffc0d5 --- /dev/null +++ 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 +}