https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89312
--- Comment #5 from Martin Sebor ---
In the future, the warnings for problems unrelated to truncation should be
moved under their own options (e.g., null pointer arguments to %s should be
controlled by either -Wnonnull or -Wnull-dereference).
Yo
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89312
Martin Sebor changed:
What|Removed |Added
Keywords||diagnostic
Status|UNCONFIRMED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89312
--- Comment #2 from Martin Husemann ---
Thanks for the explanation, but I see no way I could improve the code in
question reasonably and (sorry to be blunt) consider it quite stupid of gcc to
warn about it by default.
I do want the total string
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89312
--- Comment #3 from Martin Sebor ---
I understand your frustration but there is no good way to tell a benign
truncation from a potentially dangerous bug, so GCC errs on the side of caution
here.
The -Wformat-truncation option detects a number of
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89312
--- Comment #4 from Martin Husemann ---
This is scary.
So in the future there will be valid reasons for the truncation warning, but
you are not offering any way to suppress the totally useless false positives?
My problem with this warning is th