PR c++/87519 - bogus warning with -Wsign-conversion.
authorMarek Polacek <polacek@redhat.com>
Thu, 8 Aug 2019 15:37:46 +0000 (15:37 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Thu, 8 Aug 2019 15:37:46 +0000 (15:37 +0000)
commit60bb944817d35ec0f01e5b78a5f248dabad8b7ca
tree85ce587499a5cec5d05052d0365b5c3ba3d177a4
parent7c81497574411797ac55b9abfab1275bf3241078
PR c++/87519 - bogus warning with -Wsign-conversion.

* typeck.c (cp_build_binary_op): Use same_type_p instead of comparing
the types directly.

* g++.dg/warn/Wsign-conversion-5.C: New test.

From-SVN: r274211
gcc/cp/ChangeLog
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wsign-conversion-5.C [new file with mode: 0644]