[Bug tree-optimization/78913] Probably misleading error reported by -Wformat-length

msebor at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jan 2 17:59:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78913

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

--- Comment #7 from Martin Sebor <msebor at gcc dot gnu.org> ---
Sounds good.  I am interested in reports of excessive false positives so please
let me know if you run into some.

FYI: I'm testing a patch that splits out the snprintf truncation warning from
-Wformat-length and adds a new option (-Wformat-truncation=n) to control the
former independently of the latter.  Under this patch, the "may be truncated"
warnings are issued at n=1 when the snprintf return value is unused, and only
at n=2 when it is used.  I'll post it for review sometime this week.


More information about the Gcc-bugs mailing list