From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18643 invoked by alias); 22 Jan 2006 02:36:05 -0000 Received: (qmail 18633 invoked by uid 22791); 22 Jan 2006 02:36:05 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Sun, 22 Jan 2006 02:36:04 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1F0V5G-0003F9-EU for gdb-patches@sourceware.org; Sat, 21 Jan 2006 21:36:02 -0500 Date: Sun, 22 Jan 2006 02:36:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sourceware.org Subject: Re: RFC: Fix various problems with "printf" and warnings Message-ID: <20060122023602.GA12414@nevyn.them.org> Mail-Followup-To: gdb-patches@sourceware.org References: <20060122003117.GC8088@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00287.txt.bz2 On Sun, Jan 22, 2006 at 02:22:09AM +0100, Andreas Schwab wrote: > Daniel Jacobowitz writes: > > > + case 'o': > > + case 'x': > > + case 'X': > > + if (seen_space || seen_plus) > > + bad = 1; > > I don't think this should be rejected. I've got only the C99 spec, but I > don't think that C89 is different here in that space and plus are ignored > for unsigned and non-numeric conversions. That's what I figured too, but on the other hand, GCC warns about them: drow@nevyn:~% gcc -Wformat -o a a.c a.c: In function 'main': a.c:7: warning: ' ' flag used with '%o' printf format -- Daniel Jacobowitz CodeSourcery