From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4652 invoked by alias); 24 Feb 2015 09:18:39 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 4590 invoked by uid 48); 24 Feb 2015 09:18:35 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/65040] [5 Regression] gcc-5 -Wformat broken Date: Tue, 24 Feb 2015 09:40:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: REOPENED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-02/txt/msg02597.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65040 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |--- --- Comment #14 from Richard Biener --- #include int main() { printf ("%x%u\n", 4, 4); } > gcc-5 -Wall t.c -Wformat=2 t.c: In function 'main': t.c:4:11: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'int' [-Wformat=] printf ("%x%u\n", 4, 4); ^ t.c:4:11: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'int' [-Wformat=] that's undesirable as well (the constant fits in an unsigned int).