diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-16 13:58:07 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-16 13:58:07 +0000 |
commit | 57d46c619353e523fe06cdd22ee3231c57196de3 (patch) | |
tree | 98edefa5013064e1fe081d29fa44021bb5888015 /gcc/real.c | |
parent | 50460a3733a7a2f66a02eb14cefed62e197804df (diff) | |
download | gcc-57d46c619353e523fe06cdd22ee3231c57196de3.tar.gz |
* c-lex.c (lex_number): Use ISXDIGIT/hex_value.
* vax/xm-vms.h (FILE_NAME_NONDIRECTORY): Use ISUPPER/TOLOWER.
* fold-const.c (real_hex_to_f): Use hex_value.
* real.c (asctoeg): Use hex_value & ISXDIGIT.
* toplev.c (toplev_main): Call hex_init.
* tradcpp.c (main): Call hex_init.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48068 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/real.c')
-rw-r--r-- | gcc/real.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/gcc/real.c b/gcc/real.c index 3c9160637e9..dd62aeca23a 100644 --- a/gcc/real.c +++ b/gcc/real.c @@ -5190,12 +5190,7 @@ asctoeg (ss, y, oprec) trail = 0; nxtcom: - if (ISDIGIT (*s)) - k = *s - '0'; - else if (*s >= 'a' && *s <= 'f') - k = 10 + *s - 'a'; - else - k = 10 + *s - 'A'; + k = hex_value(*s); if ((k >= 0) && (k < base)) { /* Ignore leading zeros */ @@ -5205,9 +5200,7 @@ asctoeg (ss, y, oprec) if ((trail == 0) && (decflg != 0)) { sp = s; - while (ISDIGIT (*sp) - || (base == 16 && ((*sp >= 'a' && *sp <= 'f') - || (*sp >= 'A' && *sp <= 'F')))) + while (ISDIGIT (*sp) || (base == 16 && ISXDIGIT (*sp))) ++sp; /* Check for syntax error */ c = *sp & CHARMASK; |