aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-08-18 04:15:46 +0000
committerRichard Stallman <rms@gnu.org>1992-08-18 04:15:46 +0000
commit845e4228977a63d73e943d197377daab4879de68 (patch)
treee44a6298c59619d9d64688466050faa85859d93a
parentb39a6d4337ced6dae597f0754f33dd44bd139bec (diff)
downloadgcc-845e4228977a63d73e943d197377daab4879de68.zip
gcc-845e4228977a63d73e943d197377daab4879de68.tar.gz
gcc-845e4228977a63d73e943d197377daab4879de68.tar.bz2
(pcfinclude): Use HOST_WIDE_INT for rounding a pointer.
From-SVN: r1881
-rw-r--r--gcc/cccp.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/cccp.c b/gcc/cccp.c
index 56aa06b..3be41b8 100644
--- a/gcc/cccp.c
+++ b/gcc/cccp.c
@@ -4384,11 +4384,12 @@ pcfinclude (buf, limit, name, op)
/* First skip to a longword boundary */
/* ??? Why a 4-byte boundary? On all machines? */
- /* NOTE: while int may not be as wide as a pointer on some machins,
- this is correct nonethelesss works anyway.
- Do not try risky measures here to get another type to use! */
- if ((int) cp & 3)
- cp += 4 - ((int) cp & 3);
+ /* 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 gstddef.h or stddef.h--either one will fail! */
+ if ((HOST_WIDE_INT) cp & 3)
+ cp += 4 - ((HOST_WIDE_INT) cp & 3);
/* Now get the string. */
str = (STRINGDEF *) cp;