aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1992-07-14 06:09:46 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1992-07-14 06:09:46 -0400
commit9b0995aace7783bb700349aaed1ca1baa17cdbee (patch)
tree1b3e1cc2c5b2ea7a4d347c32f1d89244aa43d8a4
parent4e56c96a3fffc67f27ba3e46f1449739d465e41f (diff)
downloadgcc-9b0995aace7783bb700349aaed1ca1baa17cdbee.zip
gcc-9b0995aace7783bb700349aaed1ca1baa17cdbee.tar.gz
gcc-9b0995aace7783bb700349aaed1ca1baa17cdbee.tar.bz2
(yylex): Ensure TOTAL_PARTS is wide enough to store a constant as wide as we can store in an INTEGER_CST.
(yylex): Ensure TOTAL_PARTS is wide enough to store a constant as wide as we can store in an INTEGER_CST. (LONG_LONG_TYPE_SIZE): Deleted; no longer needed. From-SVN: r1588
-rw-r--r--gcc/c-lex.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/c-lex.c b/gcc/c-lex.c
index e53eb9d..a353ba9 100644
--- a/gcc/c-lex.c
+++ b/gcc/c-lex.c
@@ -65,10 +65,6 @@ extern int yydebug;
/* File used for outputting assembler code. */
extern FILE *asm_out_file;
-#ifndef LONG_LONG_TYPE_SIZE
-#define LONG_LONG_TYPE_SIZE (BITS_PER_WORD * 2)
-#endif
-
#ifndef WCHAR_TYPE_SIZE
#ifdef INT_TYPE_SIZE
#define WCHAR_TYPE_SIZE INT_TYPE_SIZE
@@ -1170,8 +1166,10 @@ yylex ()
/* for multi-precision arithmetic,
we actually store only HOST_BITS_PER_CHAR bits in each part.
The number of parts is chosen so as to be sufficient to hold
- at least as many bits as are in a target `long long' value. */
-#define TOTAL_PARTS (LONG_LONG_TYPE_SIZE / HOST_BITS_PER_CHAR) + 2
+ the enough bits to fit into the two HOST_WIDE_INTs that contain
+ the integer value (this is always at least as many bits as are
+ in a target `long long' value, but may be wider). */
+#define TOTAL_PARTS ((HOST_BITS_PER_WIDE_INT / HOST_BITS_PER_CHAR) * 2 + 2)
int parts[TOTAL_PARTS];
int overflow = 0;