diff options
author | Mark Mitchell <mark@codesourcery.com> | 2002-10-15 06:14:58 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2002-10-15 06:14:58 +0000 |
commit | 7de85f7efed13f961a08f9fe0a48c3d6ed8b5307 (patch) | |
tree | 29093ff129ab0cfa018b3056257ef5fd1c305733 /gcc | |
parent | dbf4f1a2bad3bf4dcfb00ee92820f5fbe9957577 (diff) | |
download | gcc-7de85f7efed13f961a08f9fe0a48c3d6ed8b5307.zip gcc-7de85f7efed13f961a08f9fe0a48c3d6ed8b5307.tar.gz gcc-7de85f7efed13f961a08f9fe0a48c3d6ed8b5307.tar.bz2 |
decl.c (layout_var_decl): Call layout_decl even for variables whose type is an array with unspecified bounds.
* decl.c (layout_var_decl): Call layout_decl even for variables
whose type is an array with unspecified bounds.
From-SVN: r58149
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/decl.c | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e5c7356..8abfb73 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2002-10-14 Mark Mitchell <mark@codesourcery.com> + * decl.c (layout_var_decl): Call layout_decl even for variables + whose type is an array with unspecified bounds. + PR c++/7176 * lex.c (do_identifier): Add another option for the parsing parameter. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 4401954..d122dfb 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -7617,7 +7617,11 @@ layout_var_decl (decl) `extern X x' for some incomplete type `X'.) */ if (!DECL_EXTERNAL (decl)) complete_type (type); - if (!DECL_SIZE (decl) && COMPLETE_TYPE_P (type)) + if (!DECL_SIZE (decl) + && (COMPLETE_TYPE_P (type) + || (TREE_CODE (type) == ARRAY_TYPE + && !TYPE_DOMAIN (type) + && COMPLETE_TYPE_P (TREE_TYPE (type))))) layout_decl (decl, 0); if (!DECL_EXTERNAL (decl) && DECL_SIZE (decl) == NULL_TREE) |