]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c-decl.c (pushdecl): Don't put variables on C_TYPE_INCOMPLETE_VARS of a type unless...
authorZack Weinberg <zack@gcc.gnu.org>
Mon, 1 Sep 2003 17:32:18 +0000 (17:32 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Mon, 1 Sep 2003 17:32:18 +0000 (17:32 +0000)
* c-decl.c (pushdecl): Don't put variables on
C_TYPE_INCOMPLETE_VARS of a type unless that type is itself
incomplete.

From-SVN: r70976

gcc/ChangeLog
gcc/c-decl.c

index 3a052eec18e946c7375d1ad736d91121bfd7eb86..493e4b425c98b73e768e492687557d0372e15038 100644 (file)
@@ -1,3 +1,9 @@
+2003-09-01  Zack Weinberg  <zack@codesourcery.com>
+
+       * c-decl.c (pushdecl): Don't put variables on
+       C_TYPE_INCOMPLETE_VARS of a type unless that type is itself
+       incomplete.
+
 2003-09-01  Nathanael Nerode  <neroden@gcc.gnu.org>
 
        * config.host: New file.
@@ -40,8 +46,8 @@
 
 2003-08-31  Olivier Hainque  <hainque@act-europe.fr>
 
-        * builtins.c (expand_builtin_setjmp): Use emit_jump to jump around
-        the != 0 case, which ensures pending stack adjustments are flushed.
+       * builtins.c (expand_builtin_setjmp): Use emit_jump to jump around
+       the != 0 case, which ensures pending stack adjustments are flushed.
 
 2003-08-30  Zack Weinberg  <zack@codesourcery.com>
 
index 20b9b67a071dbaf0f5aa2294525262cb63749588..8b0990faa1e783dac0bbb3652437076acb5c7266 100644 (file)
@@ -1761,7 +1761,8 @@ pushdecl (tree x)
          if ((TREE_CODE (element) == RECORD_TYPE
               || TREE_CODE (element) == UNION_TYPE)
              && (TREE_CODE (x) != TYPE_DECL
-                 || TREE_CODE (TREE_TYPE (x)) == ARRAY_TYPE))
+                 || TREE_CODE (TREE_TYPE (x)) == ARRAY_TYPE)
+             && !COMPLETE_TYPE_P (element))
            C_TYPE_INCOMPLETE_VARS (element)
              = tree_cons (NULL_TREE, x, C_TYPE_INCOMPLETE_VARS (element));
        }