From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8690 invoked by alias); 29 Apr 2013 14:45:51 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 8662 invoked by uid 48); 29 Apr 2013 14:45:51 -0000 From: "freddie_chopin at op dot pl" To: gdb-prs@sourceware.org Subject: [Bug build/15414] Build fails with mingw32-w64 GCC-4.8.0 Date: Mon, 29 Apr 2013 14:45:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: build X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: freddie_chopin at op dot pl X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-q2/txt/msg00167.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=15414 --- Comment #2 from Freddie Chopin 2013-04-29 14:45:50 UTC --- (In reply to comment #1) > According to the GCC documentation, -Wall implies -Wformat. > So offhand I would say it is a GCC bug. > However, it seems like a reasonably simple workaround would > be to add -Wformat to build_warnings in gdb/configure.ac. But there's an EXPLICIT -Wno-format and the GDB changelog says it's there because with mingw32 there may be some false positives for -Wformat. But these two options conflict with each other - one saying to check for non-literal strings (-Wformat-nonliteral), other saying to not check at all (-Wno-format). Previously GCC probably ignored that silently, now it gives a warning, which triggers an error because of -Werror. I don't think there's a bug, this behavior makes perfect sense - GCC cannot do what you ask it to do, so it gives you a warning. I also have GCC 4.7.3 (mingw32) and there's the same behavior: > gcc test.c -Wno-format -Wformat-nonliteral -Werror cc1.exe: error: -Wformat-nonliteral ignored without -Wformat [-Werror=format-non literal] cc1.exe: all warnings being treated as errors > gcc --version gcc (rev0, Built by MinGW-builds project) 4.7.3 Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > If there's still need to disable these checks for mingw32 it has to be done completely, so instead of just adding -Wno-format, -Wformat-nonliteral must be reversed to -Wno-format-nonliteral. In that case there's no error: > gcc test.c -Wno-format -Wno-format-nonliteral -Werror > test.c is just an empty main(). Previous - successful - compilations were done with GCC 4.7.2. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.