* c-decl.c (grokdeclarator): Prevent a segfault on unnamed decls.

From-SVN: r49791
This commit is contained in:
Richard Sandiford 2002-02-15 16:08:21 +00:00 committed by Richard Sandiford
parent 0b6e58fd6f
commit ee96ce90ca
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2002-02-15 Richard Sandiford <rsandifo@redhat.com>
* c-decl.c (grokdeclarator): Prevent a segfault on unnamed decls.
2002-02-15 Richard Sandiford <rsandifo@redhat.com>
* reload.c (find_dummy_reload): Check that an output register

View File

@ -4534,9 +4534,9 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
if (inner_decl == NULL_TREE
|| TREE_CODE (inner_decl) == IDENTIFIER_NODE)
attr_flags |= (int) ATTR_FLAG_DECL_NEXT;
if (TREE_CODE (inner_decl) == CALL_EXPR)
else if (TREE_CODE (inner_decl) == CALL_EXPR)
attr_flags |= (int) ATTR_FLAG_FUNCTION_NEXT;
if (TREE_CODE (inner_decl) == ARRAY_REF)
else if (TREE_CODE (inner_decl) == ARRAY_REF)
attr_flags |= (int) ATTR_FLAG_ARRAY_NEXT;
returned_attrs = decl_attributes (&type,
chainon (returned_attrs, attrs),