summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMartynas Venckus <martynas@cvs.openbsd.org>2008-06-12 16:23:39 +0000
committerMartynas Venckus <martynas@cvs.openbsd.org>2008-06-12 16:23:39 +0000
commitd29cba4dab82248708a372de995bc81b60155dd1 (patch)
treed50f4d959203dc8acdfe8d21680e1e2199622621 /gnu
parentfcb3836c45b229926007b1701265d0b3fe4023f3 (diff)
accept f in mantissa of hex float constant. from gcc svn
unbreaks libm on gcc2 ok miod@ (who created almost the same diff)
Diffstat (limited to 'gnu')
-rw-r--r--gnu/egcs/gcc/c-lex.c4
-rw-r--r--gnu/egcs/gcc/cp/lex.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/gnu/egcs/gcc/c-lex.c b/gnu/egcs/gcc/c-lex.c
index 27c65f3fa27..b8bb7e0a4db 100644
--- a/gnu/egcs/gcc/c-lex.c
+++ b/gnu/egcs/gcc/c-lex.c
@@ -1481,7 +1481,9 @@ yylex ()
|| (ISALNUM (c) && c != 'l' && c != 'L'
&& c != 'u' && c != 'U'
&& c != 'i' && c != 'I' && c != 'j' && c != 'J'
- && (floatflag == NOT_FLOAT || ((c != 'f') && (c != 'F')))))
+ && (floatflag == NOT_FLOAT
+ || ((base != 16) && (c != 'f') && (c != 'F'))
+ || base == 16)))
{
if (c == '.')
{
diff --git a/gnu/egcs/gcc/cp/lex.c b/gnu/egcs/gcc/cp/lex.c
index 73a1eac576c..8fb9583391a 100644
--- a/gnu/egcs/gcc/cp/lex.c
+++ b/gnu/egcs/gcc/cp/lex.c
@@ -3657,7 +3657,9 @@ real_yylex ()
|| (ISALNUM (c) && (c != 'l') && (c != 'L')
&& (c != 'u') && (c != 'U')
&& c != 'i' && c != 'I' && c != 'j' && c != 'J'
- && (floatflag == NOT_FLOAT || ((c != 'f') && (c != 'F')))))
+ && (floatflag == NOT_FLOAT
+ || ((base != 16) && (c != 'f') && (c != 'F'))
+ || base == 16)))
{
if (c == '.')
{