This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] PR c/14088
- From: Danny Smith <danny_r_smith_2001 at yahoo dot co dot nz>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 10 Feb 2004 11:27:53 +1100 (EST)
- Subject: [PATCH] PR c/14088
The following patch (against 3.4.0) fixes PR c/14088, (0X1p1 not treated
as hex float) Tested on 3.4 only, but should apply cleanly to trunk (and
3.3.3)
2004-02-10 Danny Smith <dannysmith@users.sourceforge.net>
PR c/14088
real.c (real_from_string): Look for 'X' as well as 'x" in
hexfloat strings.
Index: real.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/real.c,v
retrieving revision 1.135
diff -c -3 -p -r1.135 real.c
*** real.c 12 Jan 2004 18:37:40 -0000 1.135
--- real.c 10 Feb 2004 00:18:16 -0000
*************** real_from_string (REAL_VALUE_TYPE *r, co
*** 1769,1775 ****
else if (*str == '+')
str++;
! if (str[0] == '0' && str[1] == 'x')
{
/* Hexadecimal floating point. */
int pos = SIGNIFICAND_BITS - 4, d;
--- 1769,1775 ----
else if (*str == '+')
str++;
! if (str[0] == '0' && (str[1] == 'x' || str[1] == 'X'))
{
/* Hexadecimal floating point. */
int pos = SIGNIFICAND_BITS - 4, d;
http://greetings.yahoo.com.au - Yahoo! Greetings
Send your love online with Yahoo! Greetings - FREE!