diff options
author | Marek Polacek <polacek@redhat.com> | 2015-02-27 14:11:53 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2015-02-27 14:11:53 +0000 |
commit | 7631f0e27cea89316378b45955578cc53c23bc98 (patch) | |
tree | 644dc9e21cd884c81e074e2a22cd399e3342383a /gcc | |
parent | 6ad0611bec4245066bda752c4ab74d482fad1a13 (diff) | |
download | gcc-7631f0e27cea89316378b45955578cc53c23bc98.zip gcc-7631f0e27cea89316378b45955578cc53c23bc98.tar.gz gcc-7631f0e27cea89316378b45955578cc53c23bc98.tar.bz2 |
re PR c/65040 (gcc-5 -Wformat broken)
PR c/65040
* doc/invoke.texi: Update to reflect that -Wformat=2 doesn't enable
-Wformat-signedness anymore.
* c.opt (Wformat-signedness): Don't enable by -Wformat=2.
* gcc.dg/pr65066.c: Use -Wformat -Wformat-signedness and not
-Wformat=2.
From-SVN: r221061
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c-family/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/c-family/c.opt | 2 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pr65066.c | 2 |
6 files changed, 20 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 39d6d3e..bee990b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-02-27 Marek Polacek <polacek@redhat.com> + + PR c/65040 + * doc/invoke.texi: Update to reflect that -Wformat=2 doesn't enable + -Wformat-signedness anymore. + 2015-02-27 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> * config/s390/s390.c: (s390_atomic_assign_expand_fenv): New diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index ca5a412..7b63866 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2015-02-27 Marek Polacek <polacek@redhat.com> + + PR c/65040 + * c.opt (Wformat-signedness): Don't enable by -Wformat=2. + 2015-02-27 Kai Tietz <ktietz@redhat.com> PR c/35330 diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index fd00407..b3c8cee 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -456,7 +456,7 @@ C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ Obj Warn about possible security problems with format functions Wformat-signedness -C ObjC C++ ObjC++ Var(warn_format_signedness) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0) +C ObjC C++ ObjC++ Var(warn_format_signedness) Warning Warn about sign differences with format functions Wformat-y2k diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index ef4cc75..b07eed0 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -3631,7 +3631,7 @@ The C standard specifies that zero-length formats are allowed. @opindex Wformat=2 Enable @option{-Wformat} plus additional format checks. Currently equivalent to @option{-Wformat -Wformat-nonliteral -Wformat-security --Wformat-signedness -Wformat-y2k}. +-Wformat-y2k}. @item -Wformat-nonliteral @opindex Wformat-nonliteral diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 93c5b0d..11139f9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,11 @@ 2015-02-27 Marek Polacek <polacek@redhat.com> + PR c/65040 + * gcc.dg/pr65066.c: Use -Wformat -Wformat-signedness and not + -Wformat=2. + +2015-02-27 Marek Polacek <polacek@redhat.com> + PR c/65228 * gcc.dg/pr65228.c: New test. diff --git a/gcc/testsuite/gcc.dg/pr65066.c b/gcc/testsuite/gcc.dg/pr65066.c index 883a87d..291e97a 100644 --- a/gcc/testsuite/gcc.dg/pr65066.c +++ b/gcc/testsuite/gcc.dg/pr65066.c @@ -1,6 +1,6 @@ /* PR c/65066 */ /* { dg-do compile } */ -/* { dg-options "-Wformat=2" } */ +/* { dg-options "-Wformat -Wformat-signedness" } */ extern int sscanf (const char *restrict, const char *restrict, ...); int *a; |