This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]