This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
real_from_string fails to convert negative values
- From: Paul Brook <paul at nowt dot org>
- To: gcc at gcc dot gnu dot org
- Date: Sat, 28 Sep 2002 22:37:21 +0100
- Subject: real_from_string fails to convert negative values
The real_from_string function in real.c doesn't seem to convert negative
numbers correctly. It seems to return the absolute (ie. positive) value of
the value, and ignore any preceeding - signs. AFAICS the C frontend isn't
affected by this bug because the parser catches the '-' sign and then
negates the resulting value. There appears to be some code to handle
negative values in real_from_string, however this obviously isn't working.
I think this is a recent regression caused when ereal_atof was replaced. I
can't fund anything in Changelog about this so I'm not sure exactly when
the breakage occured. I'm using the tree-ssa branch (which I believe is
descended from the basic-improvements-branch), so I'm not sure if
this affects mainline or not. I'm building on i686-pc-linux-gnu.
Paul Brook