From: Marek Polacek Date: Fri, 27 Feb 2015 14:11:53 +0000 (+0000) Subject: re PR c/65040 (gcc-5 -Wformat broken) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7631f0e27cea89316378b45955578cc53c23bc98;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 39d6d3e827a..bee990ba1c6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-02-27 Marek Polacek + + PR c/65040 + * doc/invoke.texi: Update to reflect that -Wformat=2 doesn't enable + -Wformat-signedness anymore. + 2015-02-27 Andreas Krebbel * config/s390/s390.c: (s390_atomic_assign_expand_fenv): New diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index ca5a412fad9..7b638665c54 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2015-02-27 Marek Polacek + + PR c/65040 + * c.opt (Wformat-signedness): Don't enable by -Wformat=2. + 2015-02-27 Kai Tietz PR c/35330 diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index fd004072515..b3c8ceedd22 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 ef4cc75ba5d..b07eed0f6e5 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 93c5b0dc693..11139f977e5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2015-02-27 Marek Polacek + + PR c/65040 + * gcc.dg/pr65066.c: Use -Wformat -Wformat-signedness and not + -Wformat=2. + 2015-02-27 Marek Polacek PR c/65228 diff --git a/gcc/testsuite/gcc.dg/pr65066.c b/gcc/testsuite/gcc.dg/pr65066.c index 883a87d4131..291e97a8d5c 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;