Commit c5e4be6b by Marek Polacek

coroutines: Fix STRIP_NOPS usage.

parm = STRIP_NOPS (parm); is unnecessary and generates
warning: operation on 'parm' may be undefined [-Wsequence-point]
when cp/coroutines.cc is compiled with -std=c++11.

	* coroutines.cc (captures_temporary): Don't assign the result of
	STRIP_NOPS to the same variable.
parent 582fe481
2020-04-20 Marek Polacek <polacek@redhat.com>
* coroutines.cc (captures_temporary): Don't assign the result of
STRIP_NOPS to the same variable.
2020-04-20 Nathan Sidwell <nathan@acm.org> 2020-04-20 Nathan Sidwell <nathan@acm.org>
PR 94454 - tpl-tpl-parms are not canonicalizable types PR 94454 - tpl-tpl-parms are not canonicalizable types
......
...@@ -2652,7 +2652,7 @@ captures_temporary (tree *stmt, int *do_subtree, void *d) ...@@ -2652,7 +2652,7 @@ captures_temporary (tree *stmt, int *do_subtree, void *d)
parm = TREE_OPERAND (parm, 0); parm = TREE_OPERAND (parm, 0);
if (TREE_CODE (parm) == INDIRECT_REF) if (TREE_CODE (parm) == INDIRECT_REF)
parm = TREE_OPERAND (parm, 0); parm = TREE_OPERAND (parm, 0);
parm = STRIP_NOPS (parm); STRIP_NOPS (parm);
} }
/* This isn't a temporary. */ /* This isn't a temporary. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment