Commit d2504d68 by Paolo Carlini Committed by Paolo Carlini

cvt.c (cp_convert_and_check): Avoid calling cp_convert unnecessarily.

2013-11-26  Paolo Carlini  <paolo.carlini@oracle.com>

	* cvt.c (cp_convert_and_check): Avoid calling cp_convert
	unnecessarily.

From-SVN: r205387
parent 793c28b8
2013-11-26 Paolo Carlini <paolo.carlini@oracle.com>
* cvt.c (cp_convert_and_check): Avoid calling cp_convert
unnecessarily.
2013-11-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/54485
......
......@@ -630,7 +630,8 @@ cp_convert_and_check (tree type, tree expr, tsubst_flags_t complain)
{
tree folded = maybe_constant_value (expr);
tree stripped = folded;
tree folded_result = cp_convert (type, folded, complain);
tree folded_result
= folded != expr ? cp_convert (type, folded, complain) : result;
/* maybe_constant_value wraps an INTEGER_CST with TREE_OVERFLOW in a
NOP_EXPR so that it isn't TREE_CONSTANT anymore. */
......
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