[Bug c/80354] Poor support to silence -Wformat-truncation=1

2019-01-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80354 --- Comment #11 from Martin Sebor --- (In reply to Alejandro Colomar from comment #10) > Many other warnings are supressed with (void), why is this one so special? Not too many warnings can be suppressed by casts. Those that can must be at leas

[Bug c/80354] Poor support to silence -Wformat-truncation=1

2019-01-06 Thread colomar.6.4.3 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80354 Alejandro Colomar changed: What|Removed |Added CC||colomar.6.4.3 at gmail dot com --- C

[Bug c/80354] Poor support to silence -Wformat-truncation=1

2018-05-09 Thread msharov at users dot sourceforge.net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80354 --- Comment #9 from Mike Sharov --- (In reply to Martin Sebor from comment #8) > A simple way to avoid the warning while also avoiding bugs resulting from > unhandled truncation is to detect it and abort if it happens, e.g. First of all, you mig

[Bug c/80354] Poor support to silence -Wformat-truncation=1

2018-05-09 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80354 --- Comment #8 from Martin Sebor --- The problem in the pathname example is one of the bugs the warning is meant to prevent. Allowing a pathname to be silently truncated can lead to bugs -- see CWE 22 for some background and CVE-2002-0499 for an

[Bug c/80354] Poor support to silence -Wformat-truncation=1

2018-05-09 Thread msharov at users dot sourceforge.net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80354 Mike Sharov changed: What|Removed |Added CC||msharov at users dot sourceforge.n

[Bug c/80354] Poor support to silence -Wformat-truncation=1

2017-11-15 Thread toojays at toojays dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80354 John Steele Scott changed: What|Removed |Added CC||toojays at toojays dot net --- Comme

[Bug c/80354] Poor support to silence -Wformat-truncation=1

2017-04-11 Thread sbergman at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80354 --- Comment #5 from Stephan Bergmann --- (In reply to Martin Sebor from comment #3) > The warning does just what it's designed to do: point out the potential > unhandled truncation. But it is unusable in practice if there is no reliable way to s

[Bug c/80354] Poor support to silence -Wformat-truncation=1

2017-04-10 Thread egall at gwmail dot gwu.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80354 Eric Gallager changed: What|Removed |Added CC||egall at gwmail dot gwu.edu --- Comment

[Bug c/80354] Poor support to silence -Wformat-truncation=1

2017-04-10 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80354 --- Comment #3 from Martin Sebor --- The warning does just what it's designed to do: point out the potential unhandled truncation. If the argument values are such that the truncation cannot occur then using snprintf is unnecessary and sprintf ca

[Bug c/80354] Poor support to silence -Wformat-truncation=1

2017-04-10 Thread sbergman at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80354 --- Comment #2 from Stephan Bergmann --- But that makes this warning extremely hard to use. Is it really useful for -Wall in that case? I came across this with a real-world use-case in the LibreOffice code base, where some code deliberately use

[Bug c/80354] Poor support to silence -Wformat-truncation=1

2017-04-07 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80354 Martin Sebor changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---