diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5a8cb4a19246..bd6e0775786a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2006-06-29 Roger Sayle + + PR middle-end/27428 + * c-lex.c (c_lex_with_flags) : Increment errorcount + to indicate the cpplib has issued an error message for us. + 2006-06-29 Asher Langton PR target/25765 diff --git a/gcc/c-lex.c b/gcc/c-lex.c index ce231ddc4bcf..108bc5cff174 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -364,6 +364,7 @@ c_lex_with_flags (tree *value, location_t *loc, unsigned char *cpp_flags) case CPP_N_INVALID: /* cpplib has issued an error. */ *value = error_mark_node; + errorcount++; break; case CPP_N_INTEGER: diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2f6fbe2fa484..616a1ff227e7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2006-06-29 Roger Sayle + + PR middle-end/27428 + * gcc.dg/pr27428-1.c: New test case. + 2006-06-29 Mike Stump * gcc.dg/compat/struct-layout-1_generate.c: Don't use common diff --git a/gcc/testsuite/gcc.dg/pr27428-1.c b/gcc/testsuite/gcc.dg/pr27428-1.c new file mode 100644 index 000000000000..93a221c84746 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr27428-1.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +void foo() +{ + goto L; + if (0..) { L: ; } // { dg-error "too many decimal points" } +} +