[Bug middle-end/79448] unhelpful -Wformat-truncation=2 INT_MAX warning

2017-02-14 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79448 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug middle-end/79448] unhelpful -Wformat-truncation=2 INT_MAX warning

2017-02-14 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79448 --- Comment #6 from Martin Sebor --- Author: msebor Date: Tue Feb 14 16:51:24 2017 New Revision: 245437 URL: https://gcc.gnu.org/viewcvs?rev=245437&root=gcc&view=rev Log: PR middle-end/79448 - unhelpful -Wformat-truncation=2 warning gcc/testsui

[Bug middle-end/79448] unhelpful -Wformat-truncation=2 INT_MAX warning

2017-02-14 Thread mark at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79448 --- Comment #5 from Mark Wielaard --- (In reply to Martin Sebor from comment #4) > Ouch. When its size argument is zero, a snprintf call is a request to > compute the size of output without actually writing any into the destination > (which may

[Bug middle-end/79448] unhelpful -Wformat-truncation=2 INT_MAX warning

2017-02-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79448 --- Comment #4 from Martin Sebor --- Ouch. When its size argument is zero, a snprintf call is a request to compute the size of output without actually writing any into the destination (which may be a null pointer). At level 2 the checker uses t

[Bug middle-end/79448] unhelpful -Wformat-truncation=2 INT_MAX warning

2017-02-12 Thread mark at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79448 --- Comment #3 from Mark Wielaard --- A "workaround" for the example given in the description is to just pick some arbitrary number you know wouldn't get exceeded. e.g: /* To help -Wformat-truncation=2 pretend the "count" translation will

[Bug middle-end/79448] unhelpful -Wformat-truncation=2 INT_MAX warning

2017-02-10 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79448 Martin Sebor changed: What|Removed |Added Keywords||patch Status|NEW