aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2002-05-27 05:51:14 +0000
committerNeil Booth <neil@gcc.gnu.org>2002-05-27 05:51:14 +0000
commitc9220e3a83aecc4d5fa5ecfad4d203f086e0c061 (patch)
tree2f52ca5c8e31847edc88df70f877c0e92544df2b /gcc/c-common.c
parent1457a0b52ae505202bd1f341e74e039e0f4a4602 (diff)
downloadgcc-c9220e3a83aecc4d5fa5ecfad4d203f086e0c061.zip
gcc-c9220e3a83aecc4d5fa5ecfad4d203f086e0c061.tar.gz
gcc-c9220e3a83aecc4d5fa5ecfad4d203f086e0c061.tar.bz2
c-common.c (c_common_init): Set CPP arithmetic precision.
* c-common.c (c_common_init): Set CPP arithmetic precision. * cppexp.c (cpp_num_part): Move typedef ... * cpphash.h: ...here; make unsigned HOST_WIDE_INT. * cppinit.c (cpp_create_reader): Default to host long arithmetic. (sanity_checks): Update. testsuite: * gcc.dg/cpp/arith-2.c, gcc.dg/cpp/arith-3.c: New tests. * gcc.dg/cpp/if-3.c: Remove. From-SVN: r53911
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 15b9547..421f7f2 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -4488,6 +4488,10 @@ c_common_init (filename)
/* Set up preprocessor arithmetic. Must be done after call to
c_common_nodes_and_builtins for wchar_type_node to be good. */
+ if (flag_isoc99)
+ options->precision = TYPE_PRECISION (intmax_type_node);
+ else
+ options->precision = TYPE_PRECISION (long_integer_type_node);
options->char_precision = TYPE_PRECISION (char_type_node);
options->int_precision = TYPE_PRECISION (integer_type_node);
options->wchar_precision = TYPE_PRECISION (wchar_type_node);