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
This commit is contained in:
Marek Polacek 2015-02-27 14:11:53 +00:00 committed by Marek Polacek
parent 6ad0611bec
commit 7631f0e27c
6 changed files with 20 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,3 +1,9 @@
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

View File

@ -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;