]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c-decl.c (finish_incomplete_decl): Don't call complete_array_type for 'extern' arrays.
authorJason Merrill <jason@gcc.gnu.org>
Wed, 6 Sep 2000 06:06:46 +0000 (02:06 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 6 Sep 2000 06:06:46 +0000 (02:06 -0400)
        * c-decl.c (finish_incomplete_decl): Don't call complete_array_type
        for 'extern' arrays.

From-SVN: r36179

gcc/ChangeLog
gcc/c-decl.c

index d6ee969cf4e5eb98ba3dcdfcff2c82540becfe43..ca82fb29233709e3f5fa451248a7c20f058cddf0 100644 (file)
@@ -1,3 +1,8 @@
+2000-09-05  Jason Merrill  <jason@redhat.com>
+
+       * c-decl.c (finish_incomplete_decl): Don't call complete_array_type
+       for 'extern' arrays.
+
 2000-09-05  Richard Henderson  <rth@cygnus.com>
 
        * config/ia64/lib1func.asm (__divtf3): Rebundle for Itanium.
@@ -33,7 +38,7 @@
 
 2000-09-05  Bruce Korb  <bkorb@gnu.org>
 
-        * gcc/fixinc/fixincl.c(load_file): always read header files
+        * fixinc/fixincl.c (load_file): always read header files
         with sizes that are a multiple of the page size.
        & use libiberty's getpagesize for determining that.
 
index 64823591edc1446c041f1c6b3abcb11be7345987..a8cd0a351476f0b0dc9f9c1d56e9ddd989f7f618 100644 (file)
@@ -848,7 +848,7 @@ print_lang_identifier (file, node, indent)
 }
 \f
 /* Hook called at end of compilation to assume 1 elt
-   for a top-level array decl that wasn't complete before.  */
+   for a top-level tentative array defn that wasn't complete before.  */
 
 void
 finish_incomplete_decl (decl)
@@ -859,10 +859,10 @@ finish_incomplete_decl (decl)
       tree type = TREE_TYPE (decl);
       if (type != error_mark_node
          && TREE_CODE (type) == ARRAY_TYPE
+         && ! DECL_EXTERNAL (decl)
          && TYPE_DOMAIN (type) == 0)
        {
-         if (! DECL_EXTERNAL (decl))
-           warning_with_decl (decl, "array `%s' assumed to have one element");
+         warning_with_decl (decl, "array `%s' assumed to have one element");
 
          complete_array_type (type, NULL_TREE, 1);