Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: RFC: Fix various problems with "printf" and warnings
Date: Sun, 22 Jan 2006 04:56:00 -0000	[thread overview]
Message-ID: <20060122045617.GA14165@nevyn.them.org> (raw)
In-Reply-To: <uhd7wq42y.fsf@gnu.org>

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 <drow@false.org>
> > 
> > +	      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


  reply	other threads:[~2006-01-22  4:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-22  0:31 Daniel Jacobowitz
2006-01-22  1:22 ` Andreas Schwab
2006-01-22  2:36   ` Daniel Jacobowitz
2006-01-22  4:28 ` Eli Zaretskii
2006-01-22  4:56   ` Daniel Jacobowitz [this message]
2006-01-22 19:10     ` Eli Zaretskii
2006-01-22  6:38 ` Jim Blandy
2006-01-22 16:36   ` Daniel Jacobowitz
2006-02-02  2:26 ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060122045617.GA14165@nevyn.them.org \
    --to=drow@false.org \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox