[Bug c++/91397] -Wstringop-overflow specified bound 18446744073709551615 exceeds maximum object size 9223372036854775807
glisse at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Aug 8 11:30:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91397
--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> ---
if (g == 0) return (char *)malloc(0);
for (;;)
;
so the only way this can return is if g is 0. This means that in j, k is -1,
and you are calling memcpy with a huge argument. So at least in the reduced
testcase, the warning makes some sense.
More information about the Gcc-bugs
mailing list