diff options
Diffstat (limited to 'gcc/c-family/c-format.c')
-rw-r--r-- | gcc/c-family/c-format.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/c-family/c-format.c b/gcc/c-family/c-format.c index d0c07e41354..b3e1e399353 100644 --- a/gcc/c-family/c-format.c +++ b/gcc/c-family/c-format.c @@ -1460,7 +1460,7 @@ check_format_arg (void *ctx, tree format_tree, return; } if (!tree_fits_shwi_p (arg1) - || (offset = tree_low_cst (arg1, 0)) < 0) + || (offset = tree_to_shwi (arg1)) < 0) { res->number_non_literal++; return; @@ -1507,7 +1507,7 @@ check_format_arg (void *ctx, tree format_tree, } if (TREE_CODE (format_tree) == ARRAY_REF && tree_fits_shwi_p (TREE_OPERAND (format_tree, 1)) - && (offset += tree_low_cst (TREE_OPERAND (format_tree, 1), 0)) >= 0) + && (offset += tree_to_shwi (TREE_OPERAND (format_tree, 1))) >= 0) format_tree = TREE_OPERAND (format_tree, 0); if (TREE_CODE (format_tree) == VAR_DECL && TREE_CODE (TREE_TYPE (format_tree)) == ARRAY_TYPE |