diff options
Diffstat (limited to 'gcc/c')
-rw-r--r-- | gcc/c/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/c/c-decl.c | 6 | ||||
-rw-r--r-- | gcc/c/c-typeck.c | 4 |
3 files changed, 10 insertions, 5 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index dd01c63..65b40ee 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,5 +1,10 @@ 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com> + * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with + tree_to_uhwi throughout. + +2013-11-18 Richard Sandiford <rdsandiford@googlemail.com> + * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi throughout. diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index 92fc68f..1f9c286 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -4832,7 +4832,7 @@ check_bitfield_type_and_width (tree *type, tree *width, tree orig_name) *width = build_int_cst (integer_type_node, w); } else - w = tree_low_cst (*width, 1); + w = tree_to_uhwi (*width); if (TREE_CODE (*type) == ENUMERAL_TYPE) { @@ -7263,7 +7263,7 @@ finish_struct (location_t loc, tree t, tree fieldlist, tree attributes, if (DECL_INITIAL (x)) { - unsigned HOST_WIDE_INT width = tree_low_cst (DECL_INITIAL (x), 1); + unsigned HOST_WIDE_INT width = tree_to_uhwi (DECL_INITIAL (x)); DECL_SIZE (x) = bitsize_int (width); DECL_BIT_FIELD (x) = 1; SET_DECL_C_BIT_FIELD (x); @@ -7334,7 +7334,7 @@ finish_struct (location_t loc, tree t, tree fieldlist, tree attributes, && TREE_TYPE (*fieldlistp) != error_mark_node) { unsigned HOST_WIDE_INT width - = tree_low_cst (DECL_INITIAL (*fieldlistp), 1); + = tree_to_uhwi (DECL_INITIAL (*fieldlistp)); tree type = TREE_TYPE (*fieldlistp); if (width != TYPE_PRECISION (type)) { diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c index a823f14..42b6a6e 100644 --- a/gcc/c/c-typeck.c +++ b/gcc/c/c-typeck.c @@ -7210,7 +7210,7 @@ push_init_level (int implicit, struct obstack * braced_init_obstack) else if (TREE_CODE (constructor_type) == ARRAY_TYPE) { constructor_type = TREE_TYPE (constructor_type); - push_array_bounds (tree_low_cst (constructor_index, 1)); + push_array_bounds (tree_to_uhwi (constructor_index)); constructor_depth++; } @@ -8760,7 +8760,7 @@ process_init_element (struct c_expr value, bool implicit, /* Now output the actual element. */ if (value.value) { - push_array_bounds (tree_low_cst (constructor_index, 1)); + push_array_bounds (tree_to_uhwi (constructor_index)); output_init_element (value.value, value.original_type, strict_string, elttype, constructor_index, 1, implicit, |