]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c/39084 (ice on struct redefinition)
authorSteve Ellcey <sje@cup.hp.com>
Tue, 10 Feb 2009 16:43:49 +0000 (16:43 +0000)
committerSteve Ellcey <sje@gcc.gnu.org>
Tue, 10 Feb 2009 16:43:49 +0000 (16:43 +0000)
PR c/39084
* c-decl.c (start_struct): Return NULL on error.

From-SVN: r144070

gcc/ChangeLog
gcc/c-decl.c

index 3f1c90af0463a0d2e49dad310448eb1434e4ed37..944c0e9cf7cb7d8e2c508f4376d225ab2766d942 100644 (file)
@@ -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  Uros Bizjak  <ubizjak@gmail.com>
 
        PR target/39118
index 170ecf652c44134d8f651cc88b16909dbc147806..67d36362286ed87a32ca26e6e39f3150c388a3a6 100644 (file)
@@ -5370,6 +5370,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))
        {