PR tree-optimization/80523 - -Wformat-overflow doesn't consider -fexec-charset
authorMartin Sebor <msebor@redhat.com>
Fri, 28 Apr 2017 22:29:40 +0000 (22:29 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Fri, 28 Apr 2017 22:29:40 +0000 (16:29 -0600)
commitd127ae9fbed54655d1b8366be1084f6a860794b2
treeb9636a01fc267c0c7e214301db75f442397a5df2
parentc961093393e427bce36172d6b3d0348af403cd96
PR tree-optimization/80523 -  -Wformat-overflow doesn't consider -fexec-charset

gcc/ChangeLog:

PR tree-optimization/80523
* gimple-ssa-sprintf.c (target_to_host_charmap): New global variable.
(init_target_to_host_charmap, target_to_host, target_strtol10): New
functions.
(maybe_warn, format_directive, parse_directive): Use new functions.
(pass_sprintf_length::execute): Call init_target_to_host_charmap.

gcc/testsuite/ChangeLog:

PR tree-optimization/80523
* gcc.dg/tree-ssa/builtin-sprintf-warn-18.c: New test.

From-SVN: r247401
gcc/ChangeLog
gcc/c-family/c.opt
gcc/gimple-ssa-sprintf.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-18.c [new file with mode: 0644]