This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/78913] Probably misleading error reported by -Wformat-length
- From: "marxin at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 27 Dec 2016 10:04:51 +0000
- Subject: [Bug tree-optimization/78913] Probably misleading error reported by -Wformat-length
- Auto-submitted: auto-generated
- References: <bug-78913-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78913
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
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 functions. Thus, considering
that content of a string buffer is equal to it's possible size is strict for me
and I would not display such warning.
Thanks for understanding.