summaryrefslogtreecommitdiff
path: root/libcpp/include
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2014-05-20 08:01:32 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2014-05-20 08:01:32 +0000
commita30347948c2f70532bd5b58990e78012fb971b31 (patch)
treeb0ae04d799914545c090c859c13d25a91264e970 /libcpp/include
parent794a8431605d5a091e3c858857e698a3f4d8bc22 (diff)
downloadgcc-a30347948c2f70532bd5b58990e78012fb971b31.tar.gz
2014-05-20 Richard Biener <rguenther@suse.de>
gcc/ * config.gcc: Remove need_64bit_hwint. * configure.ac: Do not define NEED_64BIT_HOST_WIDE_INT. * hwint.h: Do not check NEED_64BIT_HOST_WIDE_INT but assume it to be true. * config.in: Regenerate. * configure: Likewise. libcpp/ * configure.ac: Copy gcc logic of detecting a 64bit type. Remove HOST_WIDE_INT define. * include/cpplib.h: typedef cpp_num_part to a 64bit type, similar to how hwint.h does it. * config.in: Regenerate. * configure: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210632 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/include')
-rw-r--r--libcpp/include/cpplib.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h
index a9db7abbd26..594c89940df 100644
--- a/libcpp/include/cpplib.h
+++ b/libcpp/include/cpplib.h
@@ -819,7 +819,24 @@ extern int cpp_defined (cpp_reader *, const unsigned char *, int);
/* A preprocessing number. Code assumes that any unused high bits of
the double integer are set to zero. */
-typedef unsigned HOST_WIDE_INT cpp_num_part;
+
+/* Find a type with at least 64bit precision, mimicking hwint.h.
+ This type has to be equal to unsigned HOST_WIDE_INT, see
+ gcc/c-family/c-lex.c. */
+#if SIZEOF_LONG >= 8
+typedef unsigned long cpp_num_part;
+#else
+# if SIZEOF_LONG_LONG >= 8
+typedef unsigned long long cpp_num_part;
+# else
+# if SIZEOF___INT64 >= 8
+typedef unsigned __int64 cpp_num_part;
+# else
+ #error "This line should be impossible to reach"
+# endif
+# endif
+#endif
+
typedef struct cpp_num cpp_num;
struct cpp_num
{