summaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-15 16:08:21 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-15 16:08:21 +0000
commitaeb814bb98d7d3739d2cd875bcbc2904a5b2f9ba (patch)
tree85e75e185fd76d6d463cd37692e02e2669e11db7 /gcc/c-decl.c
parent5f9b26ab10434aa48bae4a10575b346a3ac41df3 (diff)
downloadgcc-aeb814bb98d7d3739d2cd875bcbc2904a5b2f9ba.tar.gz
* c-decl.c (grokdeclarator): Prevent a segfault on unnamed decls.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49791 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index ea7942c7243..1ab120af1df 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -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),