diff options
author | Martin Sebor <msebor@redhat.com> | 2017-01-08 23:42:09 +0000 |
---|---|---|
committer | Martin Sebor <msebor@gcc.gnu.org> | 2017-01-08 16:42:09 -0700 |
commit | efcc8d387f52f995a6e41bc78a76cc77e4bb6ee8 (patch) | |
tree | f91cdc7136d16f3e039d0ea98daf535a9c7c6f30 /gcc/fortran/trans-common.c | |
parent | 1243c42d6457fd2b09917b5789c8c42dd13437ec (diff) | |
download | gcc-efcc8d387f52f995a6e41bc78a76cc77e4bb6ee8.zip gcc-efcc8d387f52f995a6e41bc78a76cc77e4bb6ee8.tar.gz gcc-efcc8d387f52f995a6e41bc78a76cc77e4bb6ee8.tar.bz2 |
PR tree-optimization/78913 - Probably misleading error reported by -Wformat-length
PR tree-optimization/78913 - Probably misleading error reported by -Wformat-length
PR middle-end/77708 - -Wformat-length %s warns for snprintf
gcc/ChangeLog:
PR middle-end/77708
* doc/invoke.texi (Warning Options): Document -Wformat-truncation.
* gimple-ssa-sprintf.c (call_info::reval_used, call_info::warnopt):
New member functions.
(format_directive): Used them.
(add_bytes): Same.
(pass_sprintf_length::handle_gimple_call): Same.
* graphite-sese-to-poly.c (tree_int_to_gmp): Increase buffer size
to avoid truncation for any argument.
(extract_affine_mul): Same.
* tree.c (get_file_function_name): Same.
gcc/c-family/ChangeLog:
PR middle-end/77708
* c.opt (-Wformat-truncation): New option.
gcc/fortran/ChangeLog:
PR tree-optimization/78913
PR middle-end/77708
* trans-common.c (build_equiv_decl): Increase buffer size to avoid
truncation for any argument.
* trans-types.c (gfc_build_logical_type): Same.
gcc/testsuite/ChangeLog:
PR middle-end/77708
* gcc.dg/tree-ssa/builtin-snprintf-warn-1.c: New test.
* gcc.dg/tree-ssa/builtin-snprintf-warn-2.c: New test.
* gcc.dg/tree-ssa/builtin-sprintf-warn-6.c: XFAIL test cases failing
due to bug 78969.
* gcc.dg/format/pr78569.c: Adjust.
From-SVN: r244210
Diffstat (limited to 'gcc/fortran/trans-common.c')
-rw-r--r-- | gcc/fortran/trans-common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/trans-common.c b/gcc/fortran/trans-common.c index 3068fee..36370eb 100644 --- a/gcc/fortran/trans-common.c +++ b/gcc/fortran/trans-common.c @@ -342,7 +342,7 @@ static tree build_equiv_decl (tree union_type, bool is_init, bool is_saved) { tree decl; - char name[15]; + char name[18]; static int serial = 0; if (is_init) |