diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-02-15 16:08:21 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-02-15 16:08:21 +0000 |
commit | aeb814bb98d7d3739d2cd875bcbc2904a5b2f9ba (patch) | |
tree | 85e75e185fd76d6d463cd37692e02e2669e11db7 /gcc/c-decl.c | |
parent | 5f9b26ab10434aa48bae4a10575b346a3ac41df3 (diff) | |
download | gcc-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.c | 4 |
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), |