From: Eric Christopher Date: Sat, 11 Sep 2004 00:00:31 +0000 (+0000) Subject: re PR c/16046 (ICE tree check: expected tree_list, have identifier_node in decl_attri... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=110fce119d81fedfe6004dcc0ab1b5d2004ec11b;p=gcc.git re PR c/16046 (ICE tree check: expected tree_list, have identifier_node in decl_attributes, at attribs.c:151) 2004-09-10 Eric Christopher PR c/16046 * c-parse.in (attribute): Add NULL_TREE for error case for error recovery. 2004-09-10 Eric Christopher * gcc.dg/20040910-1.c: New test. From-SVN: r87330 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 56450cb17d6..5c5fd675e49 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-09-10 Eric Christopher + + PR c/16046 + * c-parse.in (attribute): Add NULL_TREE for error case + for error recovery. + 2004-09-10 Zack Weinberg * 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 * c-tree.h (struct c_declspecs): Remove typedef_decl. Add diff --git a/gcc/c-parse.in b/gcc/c-parse.in index ed0e3e1d095..b14a5eae6c5 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 056073cce16..3d052a9aae6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2004-09-10 Eric Christopher + + * gcc.dg/20040910-1.c: New test. + 2004-09-11 Joseph S. Myers * 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 * 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 - + * 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 * 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 00000000000..8d27c732f35 --- /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\"" } */