diff mbox series

C++ PATCH to add test for c++/68265

Message ID 20190620220538.GL5989@redhat.com
State New
Headers show
Series C++ PATCH to add test for c++/68265 | expand

Commit Message

Marek Polacek June 20, 2019, 10:05 p.m. UTC
This funny one got fixed by r258549.

Tested x86_64-linux, applying to trunk.

2019-06-20  Marek Polacek  <polacek@redhat.com>

	PR c++/68265
	* g++.dg/parse/error62.C: New test.
diff mbox series

Patch

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
+}