aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>2000-09-06 02:06:46 -0400
committerJason Merrill <jason@gcc.gnu.org>2000-09-06 02:06:46 -0400
commit53c5b5d77ff445b5a98cf6bc2dcfb6fdd8ca478f (patch)
tree62597884d020afefe6cfc2af0677fc35a04e4dc5 /gcc/c-decl.c
parent11f53b6a0879e853b8aa3e12b81b56f1582c38f6 (diff)
downloadgcc-53c5b5d77ff445b5a98cf6bc2dcfb6fdd8ca478f.zip
gcc-53c5b5d77ff445b5a98cf6bc2dcfb6fdd8ca478f.tar.gz
gcc-53c5b5d77ff445b5a98cf6bc2dcfb6fdd8ca478f.tar.bz2
c-decl.c (finish_incomplete_decl): Don't call complete_array_type for 'extern' arrays.
* c-decl.c (finish_incomplete_decl): Don't call complete_array_type for 'extern' arrays. From-SVN: r36179
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 6482359..a8cd0a3 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -848,7 +848,7 @@ print_lang_identifier (file, node, indent)
}
/* 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);