Commit e618eb62 by Jason Merrill

dr 1188 comment

From-SVN: r175405
parent 33a549c9
...@@ -6357,7 +6357,7 @@ cxx_eval_component_reference (const constexpr_call *call, tree t, ...@@ -6357,7 +6357,7 @@ cxx_eval_component_reference (const constexpr_call *call, tree t,
} }
if (TREE_CODE (TREE_TYPE (whole)) == UNION_TYPE) 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) if (!allow_non_constant)
error ("accessing %qD member instead of initialized %qD member in " error ("accessing %qD member instead of initialized %qD member in "
"constant expression", part, CONSTRUCTOR_ELT (whole, 0)->index); "constant expression", part, CONSTRUCTOR_ELT (whole, 0)->index);
...@@ -6881,7 +6881,7 @@ cxx_eval_indirect_ref (const constexpr_call *call, tree t, ...@@ -6881,7 +6881,7 @@ cxx_eval_indirect_ref (const constexpr_call *call, tree t,
{ {
gcc_assert (!same_type_ignoring_top_level_qualifiers_p gcc_assert (!same_type_ignoring_top_level_qualifiers_p
(TREE_TYPE (TREE_TYPE (sub)), TREE_TYPE (t))); (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) if (!allow_non_constant)
error ("accessing value of %qE through a %qT glvalue in a " error ("accessing value of %qE through a %qT glvalue in a "
"constant expression", build_fold_indirect_ref (sub), "constant expression", build_fold_indirect_ref (sub),
......
// Test that we don't have to deal with type punning // 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 } // { dg-options -std=c++0x }
union U union U
......
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