diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-11-10 04:46:01 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-11-10 04:46:01 +0000 |
commit | 768169bd1d69862383de4016f7a41719e8be2992 (patch) | |
tree | 1c7f6cbe3e1a0a7f7e51eb6544697b4147b98b27 /gcc/cpplex.c | |
parent | 814c5e8e2bd2e2fbfe7948a10ff5f59c2266af78 (diff) | |
download | gcc-768169bd1d69862383de4016f7a41719e8be2992.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46912 138bc75d-0d04-0410-961f-82ee72b054a4
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 a15fccac22e..f9af8b7f5b7 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 |