aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppexp.c
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.co.uk>2002-07-17 17:27:14 +0000
committerNeil Booth <neil@gcc.gnu.org>2002-07-17 17:27:14 +0000
commit23ff022370f122c6736883f059c54f89fb5163cb (patch)
treed4ad3cdbbbc267253c90d548d8d59d8f399a5435 /gcc/cppexp.c
parentdb50171f40e718db91d21f13828a2e74f879c04c (diff)
downloadgcc-23ff022370f122c6736883f059c54f89fb5163cb.zip
gcc-23ff022370f122c6736883f059c54f89fb5163cb.tar.gz
gcc-23ff022370f122c6736883f059c54f89fb5163cb.tar.bz2
cppexp.c (cpp_interpret_integer, [...]): Clarify and correct use of "bool" variables.
* cppexp.c (cpp_interpret_integer, append_digit, parse_defined, eval_token): Clarify and correct use of "bool" variables. * cpplib.h (struct cpp_options): Similarly. * cppmacro.c (parse_params, _cpp_save_parameter): Ditto. * cpptrad.c (recursive_macro): Similarly. From-SVN: r55536
Diffstat (limited to 'gcc/cppexp.c')
-rw-r--r--gcc/cppexp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/cppexp.c b/gcc/cppexp.c
index 44ee26b..c45acb8 100644
--- a/gcc/cppexp.c
+++ b/gcc/cppexp.c
@@ -318,8 +318,8 @@ cpp_interpret_integer (pfile, token, type)
result.low = 0;
result.high = 0;
- result.unsignedp = type & CPP_N_UNSIGNED;
- result.overflow = 0;
+ result.unsignedp = !!(type & CPP_N_UNSIGNED);
+ result.overflow = false;
p = token->val.str.text;
end = p + token->val.str.len;
@@ -387,7 +387,7 @@ cpp_interpret_integer (pfile, token, type)
if (base == 10)
cpp_error (pfile, DL_WARNING,
"integer constant is so large that it is unsigned");
- result.unsignedp = 1;
+ result.unsignedp = true;
}
}
@@ -409,7 +409,7 @@ append_digit (num, digit, base, precision)
/* Multiply by 8 or 16. Catching this overflow here means we don't
need to worry about add_high overflowing. */
- overflow = num.high >> (PART_PRECISION - shift);
+ overflow = !!(num.high >> (PART_PRECISION - shift));
result.high = num.high << shift;
result.low = num.low << shift;
result.high |= num.low >> (PART_PRECISION - shift);
@@ -507,9 +507,9 @@ parse_defined (pfile)
pfile->state.prevent_expansion--;
- result.unsignedp = 0;
+ result.unsignedp = false;
result.high = 0;
- result.overflow = 0;
+ result.overflow = false;
result.low = node && node->type == NT_MACRO;
return result;
}
@@ -604,8 +604,8 @@ eval_token (pfile, token)
result.low = temp;
}
- result.unsignedp = unsignedp;
- result.overflow = 0;
+ result.unsignedp = !!unsignedp;
+ result.overflow = false;
return result;
}