On 11/10/2017 01:13 PM, Mike Stump wrote:
On Nov 10, 2017, at 11:55 AM, Martin Sebor <mse...@gmail.com> wrote:
A few not incorrect but not strictly intended (according to
the function's original purpose) uses of strncpy trigger the
new -Wstringop-truncation warning because they temporarily
leave the copied string without a terminating nul.
If people want to tighten the language used in gcc itself, I'm fine with this.
My take, I'd leave the review of that aspect of it to those that set the
language gcc uses.
The warning is included in -Wall and apparently causes errors
in a Darwin bootstrap. I already adjusted the handful of places
that did this sort of thing as I came across them in an x86_64-linux
bootstrap. I see no other uses of the function in other back ends
so this should be the only one.
Thanks
Martin