diff options
author | Zack Weinberg <zack@gcc.gnu.org> | 2000-03-07 23:11:06 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2000-03-07 23:11:06 +0000 |
commit | e23c0ba36fe2be2c8bd601828b9acd16e7ec20cb (patch) | |
tree | a31f6a5cd8330056644174c9c5293dea5cb41041 /gcc/cppexp.c | |
parent | 28c231d6479bb046652cf9dbd2e8fb5c88910952 (diff) | |
download | gcc-e23c0ba36fe2be2c8bd601828b9acd16e7ec20cb.zip gcc-e23c0ba36fe2be2c8bd601828b9acd16e7ec20cb.tar.gz gcc-e23c0ba36fe2be2c8bd601828b9acd16e7ec20cb.tar.bz2 |
[multiple changes]
2000-03-07 Neil Booth <NeilB@earthling.net>
* cppexp.c (struct operation, left_shift, right_shift,
cpp_parse_expr): Change some "char"s to "U_CHAR"s, and some
"int"s to "unsigned int"s.
* cpplib.c (detect_if_not_defined, do_assert, do_unassert):
Similarly.
* cpplib.h: Update for above.
* mkdeps.c (deps_init, deps_calc_target): Cast pointers
returned from allocations.
* cppinit.c (opt_comp, parse_options): New functions.
(handle_option): Use parse_option to parse a single command
line option, that possibly takes an argument.
(cpp_handle_options): Sort the array of command line options on
first invocation (non-ASCII hosts only).
(print_help): Update.
2000-03-07 Zack Weinberg <zack@wolery.cumb.org>
* mkdeps.c (munge): Fix off-by-one bug and inconsistencies in
backslash counting loops. Problem noted by Matt Kraai <kraai@ghs.com>.
From-SVN: r32394
Diffstat (limited to 'gcc/cppexp.c')
-rw-r--r-- | gcc/cppexp.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/gcc/cppexp.c b/gcc/cppexp.c index e3c1bdf..3ed818c 100644 --- a/gcc/cppexp.c +++ b/gcc/cppexp.c @@ -78,9 +78,11 @@ Written by Per Bothner 1994. */ static void integer_overflow PARAMS ((cpp_reader *)); static HOST_WIDEST_INT left_shift PARAMS ((cpp_reader *, HOST_WIDEST_INT, - int, unsigned HOST_WIDEST_INT)); + unsigned int, + unsigned HOST_WIDEST_INT)); static HOST_WIDEST_INT right_shift PARAMS ((cpp_reader *, HOST_WIDEST_INT, - int, unsigned HOST_WIDEST_INT)); + unsigned int, + unsigned HOST_WIDEST_INT)); static struct operation parse_number PARAMS ((cpp_reader *, U_CHAR *, U_CHAR *)); static struct operation parse_charconst PARAMS ((cpp_reader *, U_CHAR *, @@ -110,14 +112,13 @@ static struct operation lex PARAMS ((cpp_reader *, int)); /* SKIP_OPERAND is set for '&&' '||' '?' and ':' when the following operand should be short-circuited instead of evaluated. */ #define SKIP_OPERAND 8 -/*#define UNSIGNEDP 16*/ struct operation { short op; - char rprio; /* Priority of op (relative to it right operand). */ - char flags; - char unsignedp; /* true if value should be treated as unsigned */ + U_CHAR rprio; /* Priority of op (relative to it right operand). */ + U_CHAR flags; + U_CHAR unsignedp; /* true if value should be treated as unsigned */ HOST_WIDEST_INT value; /* The value logically "right" of op. */ }; @@ -610,7 +611,7 @@ static HOST_WIDEST_INT left_shift (pfile, a, unsignedp, b) cpp_reader *pfile; HOST_WIDEST_INT a; - int unsignedp; + unsigned int unsignedp; unsigned HOST_WIDEST_INT b; { if (b >= HOST_BITS_PER_WIDEST_INT) @@ -634,7 +635,7 @@ static HOST_WIDEST_INT right_shift (pfile, a, unsignedp, b) cpp_reader *pfile ATTRIBUTE_UNUSED; HOST_WIDEST_INT a; - int unsignedp; + unsigned int unsignedp; unsigned HOST_WIDEST_INT b; { if (b >= HOST_BITS_PER_WIDEST_INT) @@ -689,7 +690,7 @@ _cpp_parse_expr (pfile) struct operation *stack = init_stack; struct operation *limit = stack + INIT_STACK_SIZE; register struct operation *top = stack; - int lprio, rprio = 0; + unsigned int lprio, rprio = 0; int skip_evaluation = 0; top->rprio = 0; @@ -697,7 +698,7 @@ _cpp_parse_expr (pfile) for (;;) { struct operation op; - char flags = 0; + U_CHAR flags = 0; /* Read a token */ op = lex (pfile, skip_evaluation); @@ -780,7 +781,8 @@ _cpp_parse_expr (pfile) while (top->rprio > lprio) { HOST_WIDEST_INT v1 = top[-1].value, v2 = top[0].value; - int unsigned1 = top[-1].unsignedp, unsigned2 = top[0].unsignedp; + unsigned int unsigned1 = top[-1].unsignedp; + unsigned int unsigned2 = top[0].unsignedp; top--; if ((top[1].flags & LEFT_OPERAND_REQUIRED) && ! (top[0].flags & HAVE_VALUE)) |