diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 1999-02-25 20:40:21 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 1999-02-25 20:40:21 +0000 |
commit | e915b770d9eca0fdfd5dd363daf70be12e543579 (patch) | |
tree | f93654398f80da81daa76ad8b689f48c4ebb6328 /gcc/cppexp.c | |
parent | 056cd572516e35aff4f58939bfcd27e9bdb54d6b (diff) | |
download | gcc-e915b770d9eca0fdfd5dd363daf70be12e543579.zip gcc-e915b770d9eca0fdfd5dd363daf70be12e543579.tar.gz gcc-e915b770d9eca0fdfd5dd363daf70be12e543579.tar.bz2 |
Makefile.in (cppmain.o, [...]): Don't depend on machmode.h.
* Makefile.in (cppmain.o, cpplib.o, cpphash.o, cppalloc.o,
cpperror.o, cppexp.o, cppfiles.o, cppinit.o, fix-header.o,
scan-decls.o): Don't depend on machmode.h.
* cppexp.c: Don't define CHAR_BIT or HOST_BITS_PER_WIDE_INT anymore.
Replace all instances of HOST_WIDE_INT with HOST_WIDEST_INT.
* cppfiles.c: Likewise.
* cpplib.c: Likewise.
* cpplib.h: Likewise. Also don't include machmode.h anymore.
From-SVN: r25446
Diffstat (limited to 'gcc/cppexp.c')
-rw-r--r-- | gcc/cppexp.c | 42 |
1 files changed, 17 insertions, 25 deletions
diff --git a/gcc/cppexp.c b/gcc/cppexp.c index 3b146d2..36e134b 100644 --- a/gcc/cppexp.c +++ b/gcc/cppexp.c @@ -64,13 +64,13 @@ Written by Per Bothner 1994. */ #define MAX_WCHAR_TYPE_SIZE WCHAR_TYPE_SIZE #endif -#define MAX_CHAR_TYPE_MASK (MAX_CHAR_TYPE_SIZE < HOST_BITS_PER_WIDE_INT \ - ? (~ (~ (HOST_WIDE_INT) 0 << MAX_CHAR_TYPE_SIZE)) \ - : ~ (HOST_WIDE_INT) 0) +#define MAX_CHAR_TYPE_MASK (MAX_CHAR_TYPE_SIZE < HOST_BITS_PER_WIDEST_INT \ + ? (~ (~ (HOST_WIDEST_INT) 0 << MAX_CHAR_TYPE_SIZE)) \ + : ~ (HOST_WIDEST_INT) 0) -#define MAX_WCHAR_TYPE_MASK (MAX_WCHAR_TYPE_SIZE < HOST_BITS_PER_WIDE_INT \ - ? ~ (~ (HOST_WIDE_INT) 0 << MAX_WCHAR_TYPE_SIZE) \ - : ~ (HOST_WIDE_INT) 0) +#define MAX_WCHAR_TYPE_MASK (MAX_WCHAR_TYPE_SIZE < HOST_BITS_PER_WIDEST_INT \ + ? ~ (~ (HOST_WIDEST_INT) 0 << MAX_WCHAR_TYPE_SIZE) \ + : ~ (HOST_WIDEST_INT) 0) /* Yield nonzero if adding two numbers with A's and B's signs can yield a number with SUM's sign, where A, B, and SUM are all C integers. */ @@ -101,14 +101,6 @@ static long right_shift PARAMS ((cpp_reader *, long, int, unsigned long)); #define SKIP_OPERAND 8 /*#define UNSIGNEDP 16*/ -#ifndef CHAR_BIT -#define CHAR_BIT 8 -#endif - -#ifndef HOST_BITS_PER_WIDE_INT -#define HOST_BITS_PER_WIDE_INT (CHAR_BIT * sizeof (HOST_WIDE_INT)) -#endif - #define SKIP_WHITE_SPACE(p) do { while (is_hor_space[*p]) p++; } while (0) struct operation { @@ -116,7 +108,7 @@ struct operation { char rprio; /* Priority of op (relative to it right operand). */ char flags; char unsignedp; /* true if value should be treated as unsigned */ - HOST_WIDE_INT value; /* The value logically "right" of op. */ + HOST_WIDEST_INT value; /* The value logically "right" of op. */ }; /* Parse and convert an integer for #if. Accepts decimal, hex, or octal @@ -131,7 +123,7 @@ parse_number (pfile, start, end) struct operation op; U_CHAR *p = start; int c; - unsigned HOST_WIDE_INT n = 0, nd, MAX_over_base; + unsigned HOST_WIDEST_INT n = 0, nd, MAX_over_base; int base = 10; int overflow = 0; int digit, largest_digit = 0; @@ -154,8 +146,8 @@ parse_number (pfile, start, end) } /* Some buggy compilers (e.g. MPW C) seem to need both casts. */ - MAX_over_base = (((unsigned HOST_WIDE_INT) -1) - / ((unsigned HOST_WIDE_INT) base)); + MAX_over_base = (((unsigned HOST_WIDEST_INT) -1) + / ((unsigned HOST_WIDEST_INT) base)); while (p < end) { @@ -229,7 +221,7 @@ parse_number (pfile, start, end) cpp_pedwarn (pfile, "integer constant out of range"); /* If too big to be signed, consider it unsigned. */ - else if ((HOST_WIDE_INT) n < 0 && ! op.unsignedp) + else if ((HOST_WIDEST_INT) n < 0 && ! op.unsignedp) { if (base == 10) cpp_warning (pfile, @@ -255,7 +247,7 @@ parse_charconst (pfile, start, end) U_CHAR *end; { struct operation op; - HOST_WIDE_INT result = 0; + HOST_WIDEST_INT result = 0; int num_chars = 0; int num_bits; unsigned int width = MAX_CHAR_TYPE_SIZE, mask = MAX_CHAR_TYPE_MASK; @@ -521,11 +513,11 @@ cpp_lex (pfile, skip_evaluation) If \ is followed by 000, we return 0 and leave the string pointer after the zeros. A value of 0 does not mean end of string. */ -HOST_WIDE_INT +HOST_WIDEST_INT cpp_parse_escape (pfile, string_ptr, result_mask) cpp_reader *pfile; char **string_ptr; - HOST_WIDE_INT result_mask; + HOST_WIDEST_INT result_mask; { register int c = *(*string_ptr)++; switch (c) @@ -564,7 +556,7 @@ cpp_parse_escape (pfile, string_ptr, result_mask) case '6': case '7': { - register HOST_WIDE_INT i = c - '0'; + register HOST_WIDEST_INT i = c - '0'; register int count = 0; while (++count < 3) { @@ -586,7 +578,7 @@ cpp_parse_escape (pfile, string_ptr, result_mask) } case 'x': { - register unsigned HOST_WIDE_INT i = 0, overflow = 0; + register unsigned HOST_WIDEST_INT i = 0, overflow = 0; register int digits_found = 0, digit; for (;;) { @@ -692,7 +684,7 @@ right_shift (pfile, a, unsignedp, b) /* Parse and evaluate a C expression, reading from PFILE. Returns the value of the expression. */ -HOST_WIDE_INT +HOST_WIDEST_INT cpp_parse_expr (pfile) cpp_reader *pfile; { |