https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86586

--- Comment #8 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Wed Apr  3 20:12:00 2019
New Revision: 270136

URL: https://gcc.gnu.org/viewcvs?rev=270136&root=gcc&view=rev
Log:
        PR c++/86586 - -fcompare-debug=-Wsign-compare.

This patch limits constexpr folding for -Wsign-compare to only cases that we
would warn for without considering constant values, avoiding the folding in
the testcase in question.

gcc/c-family/
        * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
gcc/cp/
        * typeck.c (cp_build_binary_op): Don't fold for -Wsign-compare.

Modified:
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-warn.c
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/typeck.c
    trunk/gcc/testsuite/g++.target/i386/mv1.C

Reply via email to