diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-06 17:22:05 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-06 17:22:05 +0000 |
commit | 5103040532c35269761f6a0e0a298d936b38b82a (patch) | |
tree | 3e47f8eaa74dd8fb5ddab5434721cdb24a7e8c21 /gcc/matrix-reorg.c | |
parent | 2ba27e7e2ac610acdbb43ce5a91101bfedebe23f (diff) | |
download | gcc-5103040532c35269761f6a0e0a298d936b38b82a.tar.gz |
* matrix-reorg.c (compute_offset): Avoid C++ keywords.
* c-common.c: Fix typo.
(c_common_reswords): Activate more C++ keyword warnings.
testsuite:
* gcc.dg/Wcxx-compat-2.c: Adjust test for more warnings.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138817 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/matrix-reorg.c')
-rw-r--r-- | gcc/matrix-reorg.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/matrix-reorg.c b/gcc/matrix-reorg.c index 846a813898f..66145518f53 100644 --- a/gcc/matrix-reorg.c +++ b/gcc/matrix-reorg.c @@ -1755,16 +1755,20 @@ record_all_accesses_in_func (void) sbitmap_free (visited_stmts_1); } -/* Used when we want to convert the expression: RESULT = something * ORIG to RESULT = something * NEW. If ORIG and NEW are power of 2, shift operations can be done, else division and multiplication. */ +/* Used when we want to convert the expression: RESULT = something * + ORIG to RESULT = something * NEW_VAL. If ORIG and NEW_VAL are power + of 2, shift operations can be done, else division and + multiplication. */ + static tree -compute_offset (HOST_WIDE_INT orig, HOST_WIDE_INT new, tree result) +compute_offset (HOST_WIDE_INT orig, HOST_WIDE_INT new_val, tree result) { int x, y; tree result1, ratio, log, orig_tree, new_tree; x = exact_log2 (orig); - y = exact_log2 (new); + y = exact_log2 (new_val); if (x != -1 && y != -1) { @@ -1783,7 +1787,7 @@ compute_offset (HOST_WIDE_INT orig, HOST_WIDE_INT new, tree result) return result1; } orig_tree = build_int_cst (TREE_TYPE (result), orig); - new_tree = build_int_cst (TREE_TYPE (result), new); + new_tree = build_int_cst (TREE_TYPE (result), new_val); ratio = fold_build2 (TRUNC_DIV_EXPR, TREE_TYPE (result), result, orig_tree); result1 = fold_build2 (MULT_EXPR, TREE_TYPE (result), ratio, new_tree); |