This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/64629] New: [5 Regression] -Wformat-security warns with const char *const vars
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 16 Jan 2015 12:13:56 +0000
- Subject: [Bug c++/64629] New: [5 Regression] -Wformat-security warns with const char *const vars
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64629
Bug ID: 64629
Summary: [5 Regression] -Wformat-security warns with const char
*const vars
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: jakub at gcc dot gnu.org
CC: jason at gcc dot gnu.org
extern void bar (int, const char *, ...) __attribute__((format (printf, 2,
3)));
void
foo (void)
{
const char *const msg = "abc";
bar (1, msg);
}
started warning with -Wformat -Wformat-security with r217814. Was that an
intentional change for this case?
Seen on libcpp/, where the first hunk no longer works around the warning
while it used to work with gcc 4.9 and earlier.