OSDN Git Service

* c-decl.c (pushdecl): Don't put variables on
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 Sep 2003 17:32:18 +0000 (17:32 +0000)
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 Sep 2003 17:32:18 +0000 (17:32 +0000)
C_TYPE_INCOMPLETE_VARS of a type unless that type is itself
incomplete.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70976 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/c-decl.c

index 3a052ee..493e4b4 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 20b9b67..8b0990f 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));
        }