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
0596c448
Commit
0596c448
authored
Jul 08, 2016
by
Jason Merrill
Committed by
Jason Merrill
Jul 08, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* lambda.c (maybe_add_lambda_conv_op): Fix null object argument.
From-SVN: r238180
parent
d13835b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
gcc/cp/ChangeLog
+2
-0
gcc/cp/lambda.c
+5
-4
No files found.
gcc/cp/ChangeLog
View file @
0596c448
2016-07-08 Jason Merrill <jason@redhat.com>
* lambda.c (maybe_add_lambda_conv_op): Fix null object argument.
P0145R2: Refining Expression Order for C++.
* cp-gimplify.c (lvalue_has_side_effects): New.
(cp_gimplify_expr): Implement assignment ordering.
...
...
gcc/cp/lambda.c
View file @
0596c448
...
...
@@ -904,6 +904,8 @@ maybe_add_lambda_conv_op (tree type)
tree
optype
=
TREE_TYPE
(
callop
);
tree
fn_result
=
TREE_TYPE
(
optype
);
tree
thisarg
=
build_nop
(
TREE_TYPE
(
DECL_ARGUMENTS
(
callop
)),
null_pointer_node
);
if
(
generic_lambda_p
)
{
/* Prepare the dependent member call for the static member function
...
...
@@ -911,7 +913,8 @@ maybe_add_lambda_conv_op (tree type)
return expression for a deduced return call op to allow for simple
implementation of the conversion operator. */
tree
instance
=
build_nop
(
type
,
null_pointer_node
);
tree
instance
=
cp_build_indirect_ref
(
thisarg
,
RO_NULL
,
tf_warning_or_error
);
tree
objfn
=
build_min
(
COMPONENT_REF
,
NULL_TREE
,
instance
,
DECL_NAME
(
callop
),
NULL_TREE
);
int
nargs
=
list_length
(
DECL_ARGUMENTS
(
callop
))
-
1
;
...
...
@@ -923,9 +926,7 @@ maybe_add_lambda_conv_op (tree type)
else
{
direct_argvec
=
make_tree_vector
();
direct_argvec
->
quick_push
(
build1
(
NOP_EXPR
,
TREE_TYPE
(
DECL_ARGUMENTS
(
callop
)),
null_pointer_node
));
direct_argvec
->
quick_push
(
thisarg
);
}
/* Copy CALLOP's argument list (as per 'copy_list') as FN_ARGS in order to
...
...
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