From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5841 invoked by alias); 22 Jan 2006 04:56:23 -0000 Received: (qmail 5829 invoked by uid 22791); 22 Jan 2006 04:56:23 -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 04:56:19 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1F0XGz-0003h9-4l; Sat, 21 Jan 2006 23:56:17 -0500 Date: Sun, 22 Jan 2006 04:56:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: gdb-patches@sourceware.org Subject: Re: RFC: Fix various problems with "printf" and warnings Message-ID: <20060122045617.GA14165@nevyn.them.org> Mail-Followup-To: Eli Zaretskii , 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/msg00289.txt.bz2 On Sun, Jan 22, 2006 at 06:28:05AM +0200, Eli Zaretskii wrote: > > Date: Sat, 21 Jan 2006 19:31:17 -0500 > > From: Daniel Jacobowitz > > > > + else if (*f == ' ') > > + seen_space = 1; > > + else if (*f == ' ') > > + seen_plus = 1; > > A typo in the second "else if" clause. Oops. Thank you. > > + case long_double_arg: > > +#ifdef HAVE_LONG_DOUBLE > > + { > > + long double val = value_as_double (val_args[i]); > > + printf_filtered (current_substring, val); > > Won't `value_as_double' lose accuracy here, possibly catastrophically > (i.e., a non-zero number coming out as zero, etc.)? Not usually. value_as_double is somewhat misnamed; it returns a DOUBLEST, which will be long double if the host supports long double. Now, if the target has a long double with a greater precision (or just different precision, due to different format) than the host long double, this will lose out a bit. But this isn't the only place in GDB that will lose in that case. -- Daniel Jacobowitz CodeSourcery