]> gcc.gnu.org Git - gcc.git/commitdiff
* c-decl.c: (start_struct): Commonize flag setting.
authorNathan Sidwell <nathan@codesourcery.com>
Tue, 26 Nov 2002 17:36:14 +0000 (17:36 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Tue, 26 Nov 2002 17:36:14 +0000 (17:36 +0000)
From-SVN: r59527

gcc/ChangeLog
gcc/c-decl.c

index 6865d58831137267e08244181bdc831126e47c0f..c44e14c377d91e4467cb9adf52428c1da4a42190 100644 (file)
@@ -1,3 +1,7 @@
+2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * c-decl.c: (start_struct): Commonize flag setting.
+
 2002-11-26  Jason Thorpe  <thorpej@wasabisystems.com>
 
        * config/rs6000/rs6000.h (RS6000_CPU_CPP_ENDIAN_BUILTINS): New.
index 5b078c0cde526ec2d52680418a2af7b85c9fe948..ef4840ac8fffe42d8816166b31971b536366f3de 100644 (file)
@@ -4954,25 +4954,22 @@ start_struct (code, name)
     ref = lookup_tag (code, name, current_binding_level, 1);
   if (ref && TREE_CODE (ref) == code)
     {
-      C_TYPE_BEING_DEFINED (ref) = 1;
-      TYPE_PACKED (ref) = flag_pack_struct;
       if (TYPE_FIELDS (ref))
         {
          if (code == UNION_TYPE)
-           error ("redefinition of `union %s'",
-                  IDENTIFIER_POINTER (name));
+           error ("redefinition of `union %s'", IDENTIFIER_POINTER (name));
           else
-           error ("redefinition of `struct %s'",
-                  IDENTIFIER_POINTER (name));
+           error ("redefinition of `struct %s'", IDENTIFIER_POINTER (name));
        }  
-
-      return ref;
     }
+  else
+    {
+      /* Otherwise create a forward-reference just so the tag is in scope.  */
 
-  /* Otherwise create a forward-reference just so the tag is in scope.  */
-
-  ref = make_node (code);
-  pushtag (name, ref);
+      ref = make_node (code);
+      pushtag (name, ref);
+    }
+  
   C_TYPE_BEING_DEFINED (ref) = 1;
   TYPE_PACKED (ref) = flag_pack_struct;
   return ref;
This page took 0.077886 seconds and 5 git commands to generate.