public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/64629] New: [5 Regression] -Wformat-security warns with const char *const vars
@ 2015-01-16 12:14 jakub at gcc dot gnu.org
2015-01-16 12:14 ` [Bug c++/64629] " jakub at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-01-16 12:14 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/64629] [5 Regression] -Wformat-security warns with const char *const vars
2015-01-16 12:14 [Bug c++/64629] New: [5 Regression] -Wformat-security warns with const char *const vars jakub at gcc dot gnu.org
@ 2015-01-16 12:14 ` jakub at gcc dot gnu.org
2015-01-16 14:21 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-01-16 12:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64629
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |5.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/64629] [5 Regression] -Wformat-security warns with const char *const vars
2015-01-16 12:14 [Bug c++/64629] New: [5 Regression] -Wformat-security warns with const char *const vars jakub at gcc dot gnu.org
2015-01-16 12:14 ` [Bug c++/64629] " jakub at gcc dot gnu.org
@ 2015-01-16 14:21 ` jason at gcc dot gnu.org
2015-01-21 20:16 ` jason at gcc dot gnu.org
2015-01-21 20:28 ` jason at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jason at gcc dot gnu.org @ 2015-01-16 14:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64629
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2015-01-16
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/64629] [5 Regression] -Wformat-security warns with const char *const vars
2015-01-16 12:14 [Bug c++/64629] New: [5 Regression] -Wformat-security warns with const char *const vars jakub at gcc dot gnu.org
2015-01-16 12:14 ` [Bug c++/64629] " jakub at gcc dot gnu.org
2015-01-16 14:21 ` jason at gcc dot gnu.org
@ 2015-01-21 20:16 ` jason at gcc dot gnu.org
2015-01-21 20:28 ` jason at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jason at gcc dot gnu.org @ 2015-01-21 20:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64629
--- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Wed Jan 21 20:15:27 2015
New Revision: 219964
URL: https://gcc.gnu.org/viewcvs?rev=219964&root=gcc&view=rev
Log:
PR c++/64629
* c-format.c (check_format_arg): Call decl_constant_value.
Added:
trunk/gcc/testsuite/g++.dg/warn/Wformat-1.C
Modified:
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-format.c
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/64629] [5 Regression] -Wformat-security warns with const char *const vars
2015-01-16 12:14 [Bug c++/64629] New: [5 Regression] -Wformat-security warns with const char *const vars jakub at gcc dot gnu.org
` (2 preceding siblings ...)
2015-01-21 20:16 ` jason at gcc dot gnu.org
@ 2015-01-21 20:28 ` jason at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jason at gcc dot gnu.org @ 2015-01-21 20:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64629
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-01-21 20:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-16 12:14 [Bug c++/64629] New: [5 Regression] -Wformat-security warns with const char *const vars jakub at gcc dot gnu.org
2015-01-16 12:14 ` [Bug c++/64629] " jakub at gcc dot gnu.org
2015-01-16 14:21 ` jason at gcc dot gnu.org
2015-01-21 20:16 ` jason at gcc dot gnu.org
2015-01-21 20:28 ` jason at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).