dr 1188 comment

From-SVN: r175405
This commit is contained in:
Jason Merrill 2011-06-25 23:24:12 -04:00
parent 33a549c9e6
commit e618eb626c
2 changed files with 3 additions and 3 deletions

View File

@ -6357,7 +6357,7 @@ cxx_eval_component_reference (const constexpr_call *call, tree t,
}
if (TREE_CODE (TREE_TYPE (whole)) == UNION_TYPE)
{
/* FIXME Mike Miller wants this to be OK. */
/* DR 1188 says we don't have to deal with this. */
if (!allow_non_constant)
error ("accessing %qD member instead of initialized %qD member in "
"constant expression", part, CONSTRUCTOR_ELT (whole, 0)->index);
@ -6881,7 +6881,7 @@ cxx_eval_indirect_ref (const constexpr_call *call, tree t,
{
gcc_assert (!same_type_ignoring_top_level_qualifiers_p
(TREE_TYPE (TREE_TYPE (sub)), TREE_TYPE (t)));
/* FIXME Mike Miller wants this to be OK. */
/* DR 1188 says we don't have to deal with this. */
if (!allow_non_constant)
error ("accessing value of %qE through a %qT glvalue in a "
"constant expression", build_fold_indirect_ref (sub),

View File

@ -1,5 +1,5 @@
// Test that we don't have to deal with type punning
// FIXME Mike Miller thinks it should work
// DR 1188 says this is ill-formed
// { dg-options -std=c++0x }
union U