https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78913
--- Comment #10 from Martin Sebor ---
Author: msebor
Date: Sun Jan 8 23:42:09 2017
New Revision: 244210
URL: https://gcc.gnu.org/viewcvs?rev=244210&root=gcc&view=rev
Log:
PR tree-optimization/78913 - Probably misleading error reported by
-Wform
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78913
Martin Sebor changed:
What|Removed |Added
See Also||https://gcc.gnu.org/bugzill
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78913
Martin Sebor changed:
What|Removed |Added
Assignee|unassigned at gcc dot gnu.org |msebor at gcc dot
gnu.org
--- Com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78913
Martin Sebor changed:
What|Removed |Added
Status|WAITING |NEW
--- Comment #7 from Martin Sebor ---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78913
--- Comment #6 from Martin Liška ---
(In reply to Martin Sebor from comment #5)
> (In reply to Martin Sebor from comment #4)
> > 1) use the %.508s directive instead of %s, or
> > 2) verify the snprintf return value is less than 512.
>
> Whoops.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78913
--- Comment #5 from Martin Sebor ---
(In reply to Martin Sebor from comment #4)
> 1) use the %.508s directive instead of %s, or
> 2) verify the snprintf return value is less than 512.
Whoops. An off-by-one error. I meant to follow that by:
>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78913
--- Comment #4 from Martin Sebor ---
I'm not sure I do understand exactly what you mean. The warning in this
specific case is a false positive. There is no easy way for GCC to avoid it
without compromising the checker's efficacy in general. (T
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78913
--- Comment #3 from Martin Liška ---
Well, I understand that char[x] can potentially be at most x-1 characters long.
On the other hand, it's quite common case where one uses a temporary buffer
(reasonable big) which is used by sprintf-family func
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78913
--- Comment #2 from Martin Sebor ---
I should have mentioned: the -Wformat-length pass would benefit from the
results of the strlen pass. It would also benefit from better range
information. Having the pass run later, after the VRP pass, would
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78913
Martin Sebor changed:
What|Removed |Added
Keywords||diagnostic
Status|UNCONFIRMED
10 matches
Mail list logo