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
This commit is contained in:
parent
793c28b87f
commit
d2504d682b
@ -1,3 +1,8 @@
|
||||
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. */
|
||||
|
Loading…
Reference in New Issue
Block a user