aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/parse-error-2.c
diff options
context:
space:
mode:
authorVolker Reichelt <reichelt@igpm.rwth-aachen.de>2006-08-15 16:52:25 +0000
committerVolker Reichelt <reichelt@gcc.gnu.org>2006-08-15 16:52:25 +0000
commit2c14ae9a7bf2ee1380fd82d38dbb25a8eb8edebb (patch)
tree3becacfcfd14124e3f5ae691909077bb166e199d /gcc/testsuite/gcc.dg/parse-error-2.c
parent482e4739cd916f149da266c6a9197f521363697b (diff)
downloadgcc-2c14ae9a7bf2ee1380fd82d38dbb25a8eb8edebb.zip
gcc-2c14ae9a7bf2ee1380fd82d38dbb25a8eb8edebb.tar.gz
gcc-2c14ae9a7bf2ee1380fd82d38dbb25a8eb8edebb.tar.bz2
re PR c/28649 (Poor error recovery of C parser)
PR c/28649 * c-parser.c (c_parser_compound_statement_nostart): Reset parser->error after each statement. * gcc.dg/parse-error-1.c: New test. * gcc.dg/parse-error-2.c: New test. * gcc.dg/cpp/digraph2.c: Add error-marker. * gcc.dg/noncompile/920923-1.c: Likewise. From-SVN: r116157
Diffstat (limited to 'gcc/testsuite/gcc.dg/parse-error-2.c')
-rw-r--r--gcc/testsuite/gcc.dg/parse-error-2.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/parse-error-2.c b/gcc/testsuite/gcc.dg/parse-error-2.c
new file mode 100644
index 0000000..7ab3cd7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/parse-error-2.c
@@ -0,0 +1,14 @@
+/* PR c/28649 */
+/* { dg-do compile } */
+
+void foo()
+{
+ +; /* { dg-error "expected expression" } */
+}
+
+int i;
+
+void bar()
+{
+ i++; /* { dg-bogus "undeclared" } */
+}