https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79929
--- Comment #11 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- On x86_64-apple-darwin16 I see the warning Warning: '__builtin_memset': specified size 18446744073709551611 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=] for -Os and -O2 and above. I don't understand why this case is not detected with the -Wcharacter-truncation flag: the length of "bug: " // yerrmsg is the len(yerrmsg)+5, thus will be truncated when assigned to yerrmsg. Apparently the problem comes from the fact that len(yerrmsg) is not known at compile time, but I don't understand why the warning use nonsensical numbers.