This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/87756] missing unterminated argument warning using address of a constant character
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 26 Nov 2018 23:56:08 +0000
- Subject: [Bug tree-optimization/87756] missing unterminated argument warning using address of a constant character
- Auto-submitted: auto-generated
- References: <bug-87756-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87756
--- Comment #6 from Martin Sebor <msebor at gcc dot gnu.org> ---
Author: msebor
Date: Mon Nov 26 23:55:36 2018
New Revision: 266494
URL: https://gcc.gnu.org/viewcvs?rev=266494&root=gcc&view=rev
Log:
PR 87756 - missing unterminated argument warning using address of a constant
character
gcc/ChangeLog:
PR 87756
* expr.c (string_constant): Handle top-level decls of all character
types and subobjects of narrow character type.
gcc/testsuite/ChangeLog:
PR 87756
* gcc.dg/warn-sprintf-no-nul-2.c: Move incomplete tests from here...
* gcc.dg/warn-sprintf-no-nul-3.c: ...to here and complete them.
Added:
trunk/gcc/testsuite/gcc.dg/warn-sprintf-no-nul-3.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/expr.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/warn-sprintf-no-nul-2.c