[Bug middle-end/81914] [7 Regression] gcc 7.1 generates branch for code which was branchless in earlier gcc version
jg at jguk dot org
gcc-bugzilla@gcc.gnu.org
Thu Aug 29 18:45:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81914
Jonny Grant <jg at jguk dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jg at jguk dot org
--- Comment #15 from Jonny Grant <jg at jguk dot org> ---
Hello
I noticed this example below does not give a warning. I had expected something
similar for -Wsign-conversion present behaviour. Sharing my notes as follows.
A) false+true maybe not treated as signed?
B) the return conversion from size_t to int.
https://godbolt.org/z/KoVPqd
#include <cstddef>
int main()
{
size_t j = false+true;
return j;
}
More information about the Gcc-bugs
mailing list