[Bug c/89312] snprintf warning is unparsable and not confusing

2019-02-13 Thread msebor at gcc dot gnu.org
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

[Bug c/89312] snprintf warning is unparsable and not confusing

2019-02-12 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89312 Martin Sebor changed: What|Removed |Added Keywords||diagnostic Status|UNCONFIRMED

[Bug c/89312] snprintf warning is unparsable and not confusing

2019-02-12 Thread martin at netbsd dot org
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

[Bug c/89312] snprintf warning is unparsable and not confusing

2019-02-12 Thread msebor at gcc dot gnu.org
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

[Bug c/89312] snprintf warning is unparsable and not confusing

2019-02-12 Thread martin at netbsd dot org
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