[Bug tree-optimization/84555] strncpy warnings (and friends) are not ignorable with pragmas when inlined
romain.geissler at amadeus dot com
gcc-bugzilla@gcc.gnu.org
Sun Feb 25 21:37:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84555
--- Comment #1 from Romain Geissler <romain.geissler at amadeus dot com> ---
This example emits:
error: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ output
truncated before terminating nul copying 3 bytes from a string of the same
length [-Werror=stringop-truncation]
return __builtin_strncpy(dest, source, size);
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
while one would expect that no warning is emitted here.
More information about the Gcc-bugs
mailing list