This is the mail archive of the gcc-patches@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]

[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!


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