diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2002-05-05 17:05:09 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2002-05-05 17:05:09 +0000 |
commit | 2443d4e110e88050c438b4db7cba7b47dfb90893 (patch) | |
tree | 97978ba189f956d7357a86c98b15c1b1b5adaa02 /gcc/c-common.c | |
parent | 791a949fb9c633016bdb00f954979c53b0e75e9a (diff) | |
download | gcc-2443d4e110e88050c438b4db7cba7b47dfb90893.zip gcc-2443d4e110e88050c438b4db7cba7b47dfb90893.tar.gz gcc-2443d4e110e88050c438b4db7cba7b47dfb90893.tar.bz2 |
c-common.c (c_common_init): Set up CPP arithmetic.
* 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.
From-SVN: r53186
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index f009cd6..72c4988b 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -4299,6 +4299,14 @@ const char * c_common_init (filename) const char *filename; { + cpp_options *options = cpp_get_options (parse_in); + + /* Set up preprocessor arithmetic. Must be done after call to + c_common_nodes_and_builtins for wchar_type_node to be good. */ + options->char_precision = TYPE_PRECISION (char_type_node); + options->int_precision = TYPE_PRECISION (integer_type_node); + options->wchar_precision = TYPE_PRECISION (wchar_type_node); + /* NULL is passed up to toplev.c and we exit quickly. */ if (flag_preprocess_only) { |