[Bug c++/64629] New: [5 Regression] -Wformat-security warns with const char *const vars
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jan 16 12:14:00 GMT 2015
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.
More information about the Gcc-bugs
mailing list