aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>2011-06-25 23:24:12 -0400
committerJason Merrill <jason@gcc.gnu.org>2011-06-25 23:24:12 -0400
commite618eb626c028f1b4d3fbed9926f906bd20aca98 (patch)
tree04ebbc5ee58401dd91200b9c0960f8ea264d0c85 /gcc
parent33a549c9e6e99ef1e7fe1031e46d385f924282e5 (diff)
downloadgcc-e618eb626c028f1b4d3fbed9926f906bd20aca98.zip
gcc-e618eb626c028f1b4d3fbed9926f906bd20aca98.tar.gz
gcc-e618eb626c028f1b4d3fbed9926f906bd20aca98.tar.bz2
dr 1188 comment
From-SVN: r175405
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/semantics.c4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-union.C2
2 files changed, 3 insertions, 3 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 6622de6..f4aa350 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 b461305..3c7a7f3 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