On 03/23/2016 02:34 PM, Jason Merrill wrote:
For GCC 7 we should do constexpr evaluation on the unfolded function,
but for GCC 6 this is OK.
And here's a fix for the -Wall case.
Tested x86_64-pc-linux-gnu, applying to trunk.
commit 75f153ad9c455c7f2340b6da6791e5a9a0787a8e
Author: Jason Merri
For GCC 7 we should do constexpr evaluation on the unfolded function,
but for GCC 6 this is OK.
Jason
Hi!
On the following testcase, the first function is cp_folded into
return i == 0 ? 2147483648(OVF): 2147483647;
The problem is that we don't diagnose then the overflow at all.
We already have code that sets *overflow_p under right conditions,
just there wasn't any permerror call.
Fixed thusly, b