Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
e618eb62
Commit
e618eb62
authored
Jun 25, 2011
by
Jason Merrill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dr 1188 comment
From-SVN: r175405
parent
33a549c9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
gcc/cp/semantics.c
+2
-2
gcc/testsuite/g++.dg/cpp0x/constexpr-union.C
+1
-1
No files found.
gcc/cp/semantics.c
View file @
e618eb62
...
...
@@ -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
),
...
...
gcc/testsuite/g++.dg/cpp0x/constexpr-union.C
View file @
e618eb62
// 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment