diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 56450cb17d61b62261e881fe18044bacd5a41ad7..5c5fd675e4935d62e744778de7a7301d6a8eee82 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-09-10 Eric Christopher <echristo@redhat.com> + + PR c/16046 + * c-parse.in (attribute): Add NULL_TREE for error case + for error recovery. + 2004-09-10 Zack Weinberg <zack@codesourcery.com> * c-common.h (struct c_fileinfo): Comment moved here from cp-tree.h. @@ -6,8 +12,8 @@ * c-lex.c (get_fileinfo): Initialize file_info_tree here, if it's not already been done ... (init_c_lex): ... not here. - (fe_file_change): Don't call extract_interface_info -. + (fe_file_change): Don't call extract_interface_info. + 2004-09-11 Joseph S. Myers <jsm@polyomino.org.uk> * c-tree.h (struct c_declspecs): Remove typedef_decl. Add diff --git a/gcc/c-parse.in b/gcc/c-parse.in index ed0e3e1d0959242db31840d4eac48b7f9961efcf..b14a5eae6c5bcff66af79cc356fb020bdca76118 100644 --- a/gcc/c-parse.in +++ b/gcc/c-parse.in @@ -1359,7 +1359,7 @@ attribute: '(' '(' attribute_list ')' ')' start_string_translation { $$ = $5; } | ATTRIBUTE error start_string_translation - {} + { $$ = NULL_TREE; } ; attribute_list: @@ -2048,9 +2048,9 @@ c99_block_lineno_labeled_stmt: lineno_stmt: save_location stmt - { + { /* Two cases cannot and do not have line numbers associated: - If stmt is degenerate, such as "2;", then stmt is an + If stmt is degenerate, such as "2;", then stmt is an INTEGER_CST, which cannot hold line numbers. But that's ok because the statement will either be changed to a MODIFY_EXPR during gimplification of the statement expr, @@ -2831,7 +2831,7 @@ optparms: grokparm ($3))); } ; - + optellipsis: /* NULL */ { diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 056073cce16048acb324e31cfc37ae6e3dce3527..3d052a9aae665fd4cb9b7ae65264d43e10674d7b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2004-09-10 Eric Christopher <echristo@redhat.com> + + * gcc.dg/20040910-1.c: New test. + 2004-09-11 Joseph S. Myers <jsm@polyomino.org.uk> * gcc.dg/bitfld-9.c: New test. @@ -45,7 +49,7 @@ * gcc.dg/darwin-ld-20040828-1.c: New test. * gcc.dg/darwin-ld-20040828-2.c: New test. * gcc.dg/darwin-ld-20040828-3.c: New test. - + 2004-09-08 Ziemowit Laski <zlaski@apple.com> * objc.dg/bitfield-2.m: Make 'id' definition a typedef. @@ -66,10 +70,10 @@ LD_LIBRARYN32_PATH, LD_LIBRARY64_PATH and DYLD_LIBRARY_PATH. 2004-09-06 Devang Patel <dpatel@apple.com> - + * gcc.dg/tree-ssa/ifc-20040816-1.c: Use -ftree-vectorize. * gcc.dg/tree-ssa/ifc-20040816-2.c: Use -ftree-vectorize. - + 2004-09-06 Zack Weinberg <zack@codesourcery.com> * g++.old-deja/g++.other/enum2.C: Move dg-error markers to diff --git a/gcc/testsuite/gcc.dg/20040910-1.c b/gcc/testsuite/gcc.dg/20040910-1.c new file mode 100644 index 0000000000000000000000000000000000000000..8d27c732f3527424beedc7003e4136b02fbca386 --- /dev/null +++ b/gcc/testsuite/gcc.dg/20040910-1.c @@ -0,0 +1,2 @@ +/* Tests error recovery for invalid code. */ +__attribute__((foo) int f (){} /* { dg-error "syntax error before \"int\"" } */