diff options
author | sje <sje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-02-10 16:33:19 +0000 |
---|---|---|
committer | sje <sje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-02-10 16:33:19 +0000 |
commit | fc92befbb04ab12d0f594b82e9e0b120f44728c0 (patch) | |
tree | d73ffefdea836e48d49fe1c2ea7571b5a91bfaab /gcc | |
parent | 16ccc50c80088ce6e9407579b12927aba6036390 (diff) | |
download | gcc-fc92befbb04ab12d0f594b82e9e0b120f44728c0.tar.gz |
PR c/39084
* c-decl.c (start_struct): Return NULL on error.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144067 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/c-decl.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 229aa485e89..45662503f8b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2009-02-10 Steve Ellcey <sje@cup.hp.com> + + PR c/39084 + * c-decl.c (start_struct): Return NULL on error. + 2009-02-10 Jakub Jelinek <jakub@redhat.com> PR middle-end/39124 diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 9fadad385c9..491e7bbbaf5 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -5367,6 +5367,8 @@ start_struct (enum tree_code code, tree name) error ("redefinition of %<union %E%>", name); else error ("redefinition of %<struct %E%>", name); + /* Don't create structures using a name already in use. */ + ref = NULL_TREE; } else if (C_TYPE_BEING_DEFINED (ref)) { |