diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-05 17:05:09 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-05 17:05:09 +0000 |
commit | 1893c11a73d4c5844400b36bf555981f8f4a8c76 (patch) | |
tree | 97978ba189f956d7357a86c98b15c1b1b5adaa02 /gcc/cpplex.c | |
parent | 36d5634576797312ab78df11d85b071cd2004e4c (diff) | |
download | gcc-1893c11a73d4c5844400b36bf555981f8f4a8c76.tar.gz |
* c-common.c (c_common_init): Set up CPP arithmetic.
* cppinit.c (cpp_create_reader): Default CPP arithmetic to
something reasonable for the host.
(sanity_checks): Add checks.
(cpp_read_main_file): Call sanity_checks() from here...
(cpp_post_options): ... not here.
* cpplex.c (cpp_interpret_charconst): Get max_chars right.
* cpplib.h (struct cpp_options): New member int_precision.
testsuite:
* gcc.dg/cpp/charconst.c: Update tests.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53186 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpplex.c')
-rw-r--r-- | gcc/cpplex.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cpplex.c b/gcc/cpplex.c index 51c82b20608..ee34512c73b 100644 --- a/gcc/cpplex.c +++ b/gcc/cpplex.c @@ -1883,11 +1883,13 @@ cpp_interpret_charconst (pfile, token, warn_multi, pchars_seen, unsignedp) if (token->type == CPP_CHAR) { width = CPP_OPTION (pfile, char_precision); + max_chars = CPP_OPTION (pfile, int_precision) / width; unsigned_p = CPP_OPTION (pfile, signed_char) == 0; } else { width = CPP_OPTION (pfile, wchar_precision); + max_chars = 1; unsigned_p = WCHAR_UNSIGNED; } @@ -1895,7 +1897,6 @@ cpp_interpret_charconst (pfile, token, warn_multi, pchars_seen, unsignedp) mask = ((cppchar_t) 1 << width) - 1; else mask = ~0; - max_chars = BITS_PER_CPPCHAR_T / width; while (str < limit) { |