[RFC] print/x of a float/double should printf ("%a")
Daniel Jacobowitz
drow@false.org
Sun Feb 18 20:34:00 GMT 2007
On Sun, Feb 18, 2007 at 10:25:54PM +0200, Eli Zaretskii wrote:
> . I don't like this bit:
>
> > Systems not supporting "%a" will print the value as
> > print (float) a
> > which differs from the current way there:
> > print/x (long) a
>
> This makes this an incompatible change. For this reason, I'd prefer a
> new format letter, like Andreas suggested.
Is that the only reason you prefer a new format letter, rather than
changing 'x'? We could make it work everywhere - it would just be a
bit of work, probably by adding appropriate bits to gnulib. I'll
even volunteer to do it.
The current behavior is "print/x (long) val", which I consider to be
silly. I can't recall ever typing p/x on a float value and expecting
to get a result rounded to no decimal places.
--
Daniel Jacobowitz
CodeSourcery
More information about the Gdb-patches
mailing list