From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MGIkn-0003Lx-U9 for qemu-devel@nongnu.org; Mon, 15 Jun 2009 16:26:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MGIkj-0003Fw-Qz for qemu-devel@nongnu.org; Mon, 15 Jun 2009 16:26:05 -0400 Received: from [199.232.76.173] (port=44227 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MGIkj-0003FY-F4 for qemu-devel@nongnu.org; Mon, 15 Jun 2009 16:26:01 -0400 Received: from mail-qy0-f191.google.com ([209.85.221.191]:47437) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MGIki-00013h-O6 for qemu-devel@nongnu.org; Mon, 15 Jun 2009 16:26:01 -0400 Received: by qyk29 with SMTP id 29so4953464qyk.4 for ; Mon, 15 Jun 2009 13:26:00 -0700 (PDT) Message-ID: <4A36AE54.7010705@codemonkey.ws> Date: Mon, 15 Jun 2009 15:25:56 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] mingw: Do not perform string format checks References: <4A353BE2.5060204@web.de> <4A35403C.3020409@web.de> <4A36A60C.2000904@web.de> In-Reply-To: <4A36A60C.2000904@web.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Blue Swirl , qemu-devel Jan Kiszka wrote: > Johannes Schindelin wrote: > >> Hi, >> >> On Sun, 14 Jun 2009, Jan Kiszka wrote: >> >> >>> Blue Swirl wrote: >>> >>>> On 6/14/09, Jan Kiszka wrote: >>>> >>>>> [ I can't check the situation with cygwin, so this is mingw-only. ] >>>>> >>>>> gcc still does not support the Windows-specific format string modifier >>>>> "I64". Therefore, it makes no sense to check for format string >>>>> correctness and generate tons of false positives. >>>>> >>>> I don't have this problem, currently mingw builds with zero warnings >>>> for me. But I didn't enable automatic -Werror flag for mingw just >>>> because I guessed this would happen. What's the gcc version you're >>>> using? >>>> >>> i686-pc-mingw32-gcc (GCC) 4.3.3 >>> >> 4.3.3 is known to show this bad behavior. AFAICT it is fixed in 4.4.0. >> (At least it fixed things for msysGit.) >> >> FWIW by "bad behavior" I mean that a compiler warning is emitted when >> using %I64, but not when using %ll. But when executing the program, it >> actually _requires_ a %I64, _not_ a %ll. >> >> In light of this, I _strongly_ recommend updating to 4.4.0. >> > > I will, once I come across a pre-built one that fits. For now I'll carry > the -Wno-format as extra flags. The toolchain performs nicely otherwise. > If we're on mingw, and you run a test case with -Werror that fails because of broken I64, we could automatically add -Wno-format. It'll help us get closer to -Werror on mingw. Regards, Anthony Liguori