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.