diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1994-09-20 19:03:14 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1994-09-20 19:03:14 -0400 |
commit | 39ffdc1e3f2e513719464a6a09f5c8be4cd3c1dc (patch) | |
tree | e382798b23d38bcd718129203f3da96f56b86fe2 | |
parent | 979b374813e960a9536d886e8c96182db02e6078 (diff) | |
download | gcc-39ffdc1e3f2e513719464a6a09f5c8be4cd3c1dc.zip gcc-39ffdc1e3f2e513719464a6a09f5c8be4cd3c1dc.tar.gz gcc-39ffdc1e3f2e513719464a6a09f5c8be4cd3c1dc.tar.bz2 |
(eval_if_expression): Now returns HOST_WIDE_INT.
(do_if, do_elif): Reflect new return value of functions.
From-SVN: r8107
-rw-r--r-- | gcc/cccp.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -200,6 +200,7 @@ char *strerror (); char *strerror (int,...); #endif extern int parse_escape (); +extern HOST_WIDE_INT parse_c_expression (); #ifndef errno extern int errno; @@ -283,7 +284,7 @@ static void write_output (); static int check_macro_name (); static int compare_defs (); static int compare_token_lists (); -static int eval_if_expression (); +static HOST_WIDE_INT eval_if_expression (); static int discard_comments (); static int change_newlines (); static int line_for_error (); @@ -6726,7 +6727,7 @@ do_if (buf, limit, op, keyword) FILE_BUF *op; struct directive *keyword; { - int value; + HOST_WIDE_INT value; FILE_BUF *ip = &instack[indepth]; value = eval_if_expression (buf, limit - buf); @@ -6745,7 +6746,7 @@ do_elif (buf, limit, op, keyword) FILE_BUF *op; struct directive *keyword; { - int value; + HOST_WIDE_INT value; FILE_BUF *ip = &instack[indepth]; if (if_stack == instack[indepth].if_stack) { @@ -6781,14 +6782,14 @@ do_elif (buf, limit, op, keyword) * evaluate a #if expression in BUF, of length LENGTH, * then parse the result as a C expression and return the value as an int. */ -static int +static HOST_WIDE_INT eval_if_expression (buf, length) U_CHAR *buf; int length; { FILE_BUF temp_obuf; HASHNODE *save_defined; - int value; + HOST_WIDE_INT value; save_defined = install ("defined", -1, T_SPEC_DEFINED, 0, NULL_PTR, -1); pcp_inside_if = 1; |