From e618eb626c028f1b4d3fbed9926f906bd20aca98 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Sat, 25 Jun 2011 23:24:12 -0400 Subject: [PATCH] dr 1188 comment From-SVN: r175405 --- gcc/cp/semantics.c | 4 ++-- gcc/testsuite/g++.dg/cpp0x/constexpr-union.C | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 6622de62985..f4aa350cb7c 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -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), diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-union.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-union.C index b4613058ee0..3c7a7f38ec8 100644 --- a/gcc/testsuite/g++.dg/cpp0x/constexpr-union.C +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-union.C @@ -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 -- 2.30.2