aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1996-01-17 07:47:23 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1996-01-17 07:47:23 -0500
commit5b65a74fb5a0d3048624f34e76ef57712436e3f7 (patch)
tree68a7b86377c8fc7484d9d898b8f5c68914fd7e9b
parente18c4cfeb8b563b1080d82c0fb5edbdf4acf1f99 (diff)
downloadgcc-5b65a74fb5a0d3048624f34e76ef57712436e3f7.zip
gcc-5b65a74fb5a0d3048624f34e76ef57712436e3f7.tar.gz
gcc-5b65a74fb5a0d3048624f34e76ef57712436e3f7.tar.bz2
(HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT): Put back.
(pcfinclude): Use HOST_WIDE_INT for casting pointer to integer. From-SVN: r11037
-rw-r--r--gcc/cccp.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/gcc/cccp.c b/gcc/cccp.c
index 1163660..499727e 100644
--- a/gcc/cccp.c
+++ b/gcc/cccp.c
@@ -263,6 +263,20 @@ static void hack_vms_include_specification ();
#define MIN(X,Y) ((X) < (Y) ? (X) : (Y))
#define MAX(X,Y) ((X) > (Y) ? (X) : (Y))
+/* Find the largest host integer type and set its size and type. */
+
+#ifndef HOST_BITS_PER_WIDE_INT
+
+#if HOST_BITS_PER_LONG > HOST_BITS_PER_INT
+#define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
+#define HOST_WIDE_INT long
+#else
+#define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_INT
+#define HOST_WIDE_INT int
+#endif
+
+#endif
+
#ifndef S_ISREG
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#endif
@@ -5257,12 +5271,12 @@ pcfinclude (buf, limit, name, op)
/* First skip to a longword boundary */
/* ??? Why a 4-byte boundary? On all machines? */
- /* NOTE: This works correctly even if int
+ /* NOTE: This works correctly even if HOST_WIDE_INT
is narrower than a pointer.
Do not try risky measures here to get another type to use!
Do not include stddef.h--it will fail! */
- if ((int) cp & 3)
- cp += 4 - ((int) cp & 3);
+ if ((HOST_WIDE_INT) cp & 3)
+ cp += 4 - ((HOST_WIDE_INT) cp & 3);
/* Now get the string. */
str = (STRINGDEF *) (GENERIC_PTR) cp;