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
cb8384a3
Commit
cb8384a3
authored
Feb 10, 2011
by
Jason Merrill
Committed by
Jason Merrill
Feb 10, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* cvt.c (convert_to_void): Handle null op1.
From-SVN: r170007
parent
69f36ba6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
4 deletions
+16
-4
gcc/cp/ChangeLog
+2
-0
gcc/cp/cvt.c
+8
-4
gcc/testsuite/ChangeLog
+2
-0
gcc/testsuite/g++.dg/cpp0x/regress/ext-cond1.C
+4
-0
No files found.
gcc/cp/ChangeLog
View file @
cb8384a3
2011-02-09 Jason Merrill <jason@redhat.com>
* cvt.c (convert_to_void): Handle null op1.
* class.c (type_has_constexpr_default_constructor): Make sure the
caller stripped an enclosing array.
* init.c (perform_member_init): Strip arrays before calling it.
...
...
gcc/cp/cvt.c
View file @
cb8384a3
...
...
@@ -892,20 +892,24 @@ convert_to_void (tree expr, impl_conv_void implicit, tsubst_flags_t complain)
/* The two parts of a cond expr might be separate lvalues. */
tree
op1
=
TREE_OPERAND
(
expr
,
1
);
tree
op2
=
TREE_OPERAND
(
expr
,
2
);
bool
side_effects
=
TREE_SIDE_EFFECTS
(
op1
)
||
TREE_SIDE_EFFECTS
(
op2
);
bool
side_effects
=
((
op1
&&
TREE_SIDE_EFFECTS
(
op1
))
||
TREE_SIDE_EFFECTS
(
op2
));
tree
new_op1
,
new_op2
;
new_op1
=
NULL_TREE
;
if
(
implicit
!=
ICV_CAST
&&
!
side_effects
)
{
new_op1
=
convert_to_void
(
op1
,
ICV_SECOND_OF_COND
,
complain
);
if
(
op1
)
new_op1
=
convert_to_void
(
op1
,
ICV_SECOND_OF_COND
,
complain
);
new_op2
=
convert_to_void
(
op2
,
ICV_THIRD_OF_COND
,
complain
);
}
else
{
new_op1
=
convert_to_void
(
op1
,
ICV_CAST
,
complain
);
if
(
op1
)
new_op1
=
convert_to_void
(
op1
,
ICV_CAST
,
complain
);
new_op2
=
convert_to_void
(
op2
,
ICV_CAST
,
complain
);
}
expr
=
build3
(
COND_EXPR
,
TREE_TYPE
(
new_op
1
),
expr
=
build3
(
COND_EXPR
,
TREE_TYPE
(
new_op
2
),
TREE_OPERAND
(
expr
,
0
),
new_op1
,
new_op2
);
break
;
}
...
...
gcc/testsuite/ChangeLog
View file @
cb8384a3
2011-02-09 Jason Merrill <jason@redhat.com>
* g++.dg/cpp0x/regress/ext-cond1.C: Copy from ext/cond1.C.
* g++.dg/cpp0x/regress/abi-empty7.C: New.
* g++.dg/cpp0x/regress: New directory.
...
...
gcc/testsuite/g++.dg/cpp0x/regress/ext-cond1.C
0 → 100644
View file @
cb8384a3
// PR c++/12515
// { dg-do compile }
// { dg-options "-std=gnu++0x" }
template
<
int
>
void
foo
()
{
0
?:
0
;
}
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