diff options
author | msebor <msebor@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-11-27 17:07:24 +0000 |
---|---|---|
committer | msebor <msebor@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-11-27 17:07:24 +0000 |
commit | d019d1b8955cb5e899397a8d388f5b6340628c69 (patch) | |
tree | cd622ce1a7298ac30c7e08478aad5138dd3c82aa | |
parent | bc7f2a7dcb2a22b00e3b71e22234b59ec451e9f8 (diff) |
PR 87756 - missing unterminated argument warning using address of a constant character
PR 88211 - missing warning on printf %ls and unterminated wide member array
PR 88226 - missing warning on fprintf, fputs, and puts with an unterminated array
gcc/ChangeLog:
* gcc.dg/tree-ssa/builtin-fprintf-warn-1.c: Update/remove xfails.
* gcc.dg/tree-ssa/builtin-printf-warn-1.c: Same.
* gcc.dg/tree-ssa/user-printf-warn-1.c: Same.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266522 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-warn-1.c | 8 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-warn-1.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/user-printf-warn-1.c | 6 |
4 files changed, 19 insertions, 10 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 00a063ddeb5..d8eff400285 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2018-11-27 Martin Sebor <msebor@redhat.com> + + PR 87756 + PR 88211 + PR 88226 + * gcc.dg/tree-ssa/builtin-fprintf-warn-1.c: Update/remove xfails. + * gcc.dg/tree-ssa/builtin-printf-warn-1.c: Same. + * gcc.dg/tree-ssa/user-printf-warn-1.c: Same. + 2018-11-27 Mike Gulick <mgulick@mathworks.com> PR preprocessor/83173 diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-warn-1.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-warn-1.c index 5e193d6854a..690404ade99 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-warn-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-warn-1.c @@ -84,8 +84,8 @@ void test_fprintf_s_const (int width) if (nulptr) T ("%s", nulptr); - T ("%s", &chr_no_nul); /* { dg-warning ".%s. directive argument is not a nul-terminated string" "pr87756" { xfail *-*-* } } */ - T ("%s", arr_no_nul); /* { dg-warning ".%s. directive argument is not a nul-terminated string" "pr87756" { xfail *-*-* } } */ + T ("%s", &chr_no_nul); /* { dg-warning ".%s. directive argument is not a nul-terminated string" "pr88226" { xfail *-*-* } } */ + T ("%s", arr_no_nul); /* { dg-warning ".%s. directive argument is not a nul-terminated string" "pr88226" { xfail *-*-* } } */ /* Verify that output in excess of INT_MAX bytes is diagnosed even when the size of the destination object is unknown. */ @@ -116,8 +116,8 @@ void test_fprintf_ls_const (int width) if (nulptr) T ("%ls", nulptr); - T ("%ls", &wchr_no_nul); /* { dg-warning ".%ls. directive argument is not a nul-terminated string" "pr87756" { xfail *-*-* } } */ - T ("%ls", warr_no_nul); /* { dg-warning ".%ls. directive argument is not a nul-terminated string" "pr87756" { xfail *-*-* } } */ + T ("%ls", &wchr_no_nul); /* { dg-warning ".%ls. directive argument is not a nul-terminated string" } */ + T ("%ls", warr_no_nul); /* { dg-warning ".%ls. directive argument is not a nul-terminated string" "pr88211" { xfail *-*-* } } */ /* Verify that output in excess of INT_MAX bytes is diagnosed even when the size of the destination object is unknown. */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-warn-1.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-warn-1.c index 31a5bd3e9b0..87ef6602582 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-warn-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-warn-1.c @@ -81,7 +81,7 @@ void test_printf_s_const (int width) if (nulptr) T ("%s", nulptr); - T ("%s", &chr_no_nul); /* { dg-warning ".%s. directive argument is not a nul-terminated string" "pr87756" { xfail *-*-* } } */ + T ("%s", &chr_no_nul); /* { dg-warning ".%s. directive argument is not a nul-terminated string" } */ T ("%s", arr_no_nul); /* { dg-warning ".%s. directive argument is not a nul-terminated string" } */ /* Verify that output in excess of INT_MAX bytes is diagnosed even @@ -113,8 +113,8 @@ void test_printf_ls_const (int width) if (nulptr) T ("%ls", nulptr); - T ("%ls", &wchr_no_nul); /* { dg-warning ".%ls. directive argument is not a nul-terminated string" "pr87756" { xfail *-*-* } } */ - T ("%ls", warr_no_nul); /* { dg-warning ".%ls. directive argument is not a nul-terminated string" "pr87756" { xfail *-*-* } } */ + T ("%ls", &wchr_no_nul); /* { dg-warning ".%ls. directive argument is not a nul-terminated string" } */ + T ("%ls", warr_no_nul); /* { dg-warning ".%ls. directive argument is not a nul-terminated string" "pr88211" { xfail *-*-* } } */ /* Verify that output in excess of INT_MAX bytes is diagnosed even when the size of the destination object is unknown. */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/user-printf-warn-1.c b/gcc/testsuite/gcc.dg/tree-ssa/user-printf-warn-1.c index 4788b02025f..1896e1c6489 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/user-printf-warn-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/user-printf-warn-1.c @@ -107,7 +107,7 @@ void test_user_print_s_const (int width) if (null) T ("%s", null); - T ("%s", &chr_no_nul); /* { dg-warning ".%s. directive argument is not a nul-terminated string" "pr87756" { xfail *-*-* } } */ + T ("%s", &chr_no_nul); /* { dg-warning ".%s. directive argument is not a nul-terminated string" } */ T ("%s", arr_no_nul); /* { dg-warning ".%s. directive argument is not a nul-terminated string" } */ /* Verify that output in excess of INT_MAX bytes is diagnosed even @@ -139,8 +139,8 @@ void test_user_print_ls_const (int width) if (null) T ("%ls", null); - T ("%ls", &wchr_no_nul); /* { dg-warning ".%ls. directive argument is not a nul-terminated string" "pr87756" { xfail *-*-* } } */ - T ("%ls", warr_no_nul); /* { dg-warning ".%ls. directive argument is not a nul-terminated string" "pr87756" { xfail *-*-* } } */ + T ("%ls", &wchr_no_nul); /* { dg-warning ".%ls. directive argument is not a nul-terminated string" } */ + T ("%ls", warr_no_nul); /* { dg-warning ".%ls. directive argument is not a nul-terminated string" "pr88211" { xfail *-*-* } } */ /* Verify that output in excess of INT_MAX bytes is diagnosed even when the size of the destination object is unknown. */ |