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
This commit is contained in:
Mark Mitchell 2002-10-15 06:14:58 +00:00 committed by Mark Mitchell
parent dbf4f1a2ba
commit 7de85f7efe
2 changed files with 8 additions and 1 deletions

View File

@ -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.

View File

@ -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)