Commit 859f6cb4 by Jason Merrill Committed by Jason Merrill

typeck.c (cp_apply_type_quals_to_decl): Don't check COMPLETE_TYPE_P either.

	* typeck.c (cp_apply_type_quals_to_decl): Don't check
	COMPLETE_TYPE_P either.

From-SVN: r176052
parent 0094f21b
2011-07-08 Jason Merrill <jason@redhat.com> 2011-07-08 Jason Merrill <jason@redhat.com>
* typeck.c (cp_apply_type_quals_to_decl): Don't check
COMPLETE_TYPE_P either.
PR c++/49673 PR c++/49673
* typeck.c (cp_apply_type_quals_to_decl): Don't check * typeck.c (cp_apply_type_quals_to_decl): Don't check
TYPE_NEEDS_CONSTRUCTING. TYPE_NEEDS_CONSTRUCTING.
......
...@@ -8130,12 +8130,10 @@ cp_apply_type_quals_to_decl (int type_quals, tree decl) ...@@ -8130,12 +8130,10 @@ cp_apply_type_quals_to_decl (int type_quals, tree decl)
/* We used to check TYPE_NEEDS_CONSTRUCTING here, but now a constexpr /* We used to check TYPE_NEEDS_CONSTRUCTING here, but now a constexpr
constructor can produce constant init, so rely on cp_finish_decl to constructor can produce constant init, so rely on cp_finish_decl to
clear TREE_READONLY if the variable has non-constant init. */ clear TREE_READONLY if the variable has non-constant init. */
if (/* If the type isn't complete, we don't know yet if it will need
constructing. */ /* If the type has a mutable component, that component might be
!COMPLETE_TYPE_P (type) modified. */
/* If the type has a mutable component, that component might be if (TYPE_HAS_MUTABLE_P (type))
modified. */
|| TYPE_HAS_MUTABLE_P (type))
type_quals &= ~TYPE_QUAL_CONST; type_quals &= ~TYPE_QUAL_CONST;
c_apply_type_quals_to_decl (type_quals, decl); c_apply_type_quals_to_decl (type_quals, decl);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment