diff options
author | Jakub Jelinek <jakub@redhat.com> | 2017-10-10 18:17:47 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2017-10-10 18:17:47 +0200 |
commit | 802b38c91f7c5a03e69e37bd4a1ad54a46020671 (patch) | |
tree | 0a3c72e25a92aefd78d1847ce86e51522dab076e /gcc/c-family/c-warn.c | |
parent | a6a5091a56a6f7e7d98643cc14c59313eebf8e6f (diff) | |
download | gcc-802b38c91f7c5a03e69e37bd4a1ad54a46020671.zip gcc-802b38c91f7c5a03e69e37bd4a1ad54a46020671.tar.gz gcc-802b38c91f7c5a03e69e37bd4a1ad54a46020671.tar.bz2 |
re PR c/82437 (false-positive -Wtautological-compare warning with -std=gnu89)
PR c/82437
* c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
instead of wide_int::from.
* c-c++-common/Wtautological-compare-7.c: New test.
From-SVN: r253589
Diffstat (limited to 'gcc/c-family/c-warn.c')
-rw-r--r-- | gcc/c-family/c-warn.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/c-family/c-warn.c b/gcc/c-family/c-warn.c index 2eb4cf5..717fe7f 100644 --- a/gcc/c-family/c-warn.c +++ b/gcc/c-family/c-warn.c @@ -362,8 +362,8 @@ warn_tautological_bitwise_comparison (location_t loc, tree_code code, int prec = MAX (TYPE_PRECISION (TREE_TYPE (cst)), TYPE_PRECISION (TREE_TYPE (bitopcst))); - wide_int bitopcstw = wide_int::from (bitopcst, prec, UNSIGNED); - wide_int cstw = wide_int::from (cst, prec, UNSIGNED); + wide_int bitopcstw = wi::to_wide (bitopcst, prec); + wide_int cstw = wi::to_wide (cst, prec); wide_int res; if (TREE_CODE (bitop) == BIT_AND_EXPR) |