diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2001-11-10 04:46:01 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2001-11-10 04:46:01 +0000 |
commit | 9e1ac9154abc68bb0ebaf2b2585b0a204c616240 (patch) | |
tree | 1c7f6cbe3e1a0a7f7e51eb6544697b4147b98b27 /gcc/cpplex.c | |
parent | 57870f8acd9cb9d86c18104702e6752b9cb08171 (diff) | |
download | gcc-9e1ac9154abc68bb0ebaf2b2585b0a204c616240.zip gcc-9e1ac9154abc68bb0ebaf2b2585b0a204c616240.tar.gz gcc-9e1ac9154abc68bb0ebaf2b2585b0a204c616240.tar.bz2 |
cppexp.c (parse_number): Use ISXDIGIT/hex_value.
* cppexp.c (parse_number): Use ISXDIGIT/hex_value.
* cpplex.c (hex_digit_value): Use hex_p/hex_value.
* cppmain.c (general_init): Call hex_init.
From-SVN: r46912
Diffstat (limited to 'gcc/cpplex.c')
-rw-r--r-- | gcc/cpplex.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/gcc/cpplex.c b/gcc/cpplex.c index a15fcca..f9af8b7 100644 --- a/gcc/cpplex.c +++ b/gcc/cpplex.c @@ -1601,13 +1601,10 @@ static unsigned int hex_digit_value (c) unsigned int c; { - if (c >= 'a' && c <= 'f') - return c - 'a' + 10; - if (c >= 'A' && c <= 'F') - return c - 'A' + 10; - if (c >= '0' && c <= '9') - return c - '0'; - abort (); + if (hex_p (c)) + return hex_value (c); + else + abort (); } /* Parse a '\uNNNN' or '\UNNNNNNNN' sequence. Returns 1 to indicate |