[Bug tree-optimization/88993] [9 Regression] GCC 9 -Wformat-overflow=2 should reflect real libc limits
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88993 Paul Eggert changed: What|Removed |Added CC||eggert at cs dot ucla.edu --- Comment #16 from Paul Eggert --- Although fixed for printf, this bug remains for sprintf so I filed a followup report for that, bug#110333.
[Bug tree-optimization/88993] [9 Regression] GCC 9 -Wformat-overflow=2 should reflect real libc limits
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88993 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #15 from Martin Sebor --- The warning has been relaxed for GCC 9 in r269125.
[Bug tree-optimization/88993] [9 Regression] GCC 9 -Wformat-overflow=2 should reflect real libc limits
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88993 --- Comment #14 from Martin Sebor --- Author: msebor Date: Fri Feb 22 17:38:11 2019 New Revision: 269125 URL: https://gcc.gnu.org/viewcvs?rev=269125&root=gcc&view=rev Log: PR tree-optimization/88993 - GCC 9 -Wformat-overflow=2 should reflect real libc limits PR tree-optimization/88835 - overly aggressive -Werror=format-overflow for printf gcc/ChangeLog: PR tree-optimization/88993 PR tree-optimization/88853 * gimple-ssa-sprintf.c (sprintf_dom_walker::call_info::is_file_func): New helper. (sprintf_dom_walker::call_info::is_string_func): New helper. (format_directive): Only issue "may exceed" 4095/INT_MAX warnings for formatted string functions. (sprintf_dom_walker::handle_gimple_call): Fix a typo in a comment. gcc/testsuite/ChangeLog: PR tree-optimization/88993 PR tree-optimization/88853 * gcc.dg/tree-ssa/builtin-fprintf-warn-2.c: New test. * gcc.dg/tree-ssa/builtin-printf-warn-2.c: New test. * gcc.dg/tree-ssa/builtin-snprintf-warn-3.c: Adjust. * gcc.dg/tree-ssa/builtin-sprintf-warn-18.c: Same. Added: trunk/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-warn-2.c trunk/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-warn-2.c Modified: trunk/gcc/gimple-ssa-sprintf.c trunk/gcc/testsuite/gcc.dg/tree-ssa/builtin-snprintf-warn-3.c trunk/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-18.c
[Bug tree-optimization/88993] [9 Regression] GCC 9 -Wformat-overflow=2 should reflect real libc limits
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88993 Martin Sebor changed: What|Removed |Added Component|c |tree-optimization --- Comment #13 from Martin Sebor --- The patch referenced in comment #9 suppresses the warning for printf and fprintf (leaving it for sprintf).