diff options
author | ro <ro@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-05-29 15:00:29 +0000 |
---|---|---|
committer | ro <ro@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-05-29 15:00:29 +0000 |
commit | a2115a4a0660b16ec18709b69767f5c344ca9898 (patch) | |
tree | cd17c4536fed91355bfe60f36a95261d4d0ca6ed /gcc/c/c-array-notation.c | |
parent | ac9929f16a52f275c308bba5ced4dc3d3d8fb6df (diff) | |
download | gcc-a2115a4a0660b16ec18709b69767f5c344ca9898.tar.gz |
Fix c/c-array-notation.c compilation failure (PR bootstrap/57450)
PR bootstrap/57450
* c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
(build_array_notation_expr): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@199410 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c/c-array-notation.c')
-rw-r--r-- | gcc/c/c-array-notation.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/c/c-array-notation.c b/gcc/c/c-array-notation.c index c70345cfa98..bf139a855f2 100644 --- a/gcc/c/c-array-notation.c +++ b/gcc/c/c-array-notation.c @@ -116,7 +116,7 @@ length_mismatch_in_expr_p (location_t loc, tree **list, size_t x, size_t y) { l_node = int_cst_value (list[ii][jj]); l_start = int_cst_value (start); - if (abs (l_start) != abs (l_node)) + if (absu_hwi (l_start) != absu_hwi (l_node)) { error_at (loc, "length mismatch in expression"); return true; @@ -1561,7 +1561,7 @@ build_array_notation_expr (location_t location, tree lhs, tree lhs_origtype, HOST_WIDE_INT r_length = int_cst_value (rhs_length[0][0]); /* Length can be negative or positive. As long as the magnitude is OK, then the array notation is valid. */ - if (abs (l_length) != abs (r_length)) + if (absu_hwi (l_length) != absu_hwi (r_length)) { error_at (location, "length mismatch between LHS and RHS"); pop_stmt_list (an_init); |