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

Stephan Bergmann <sbergman at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sbergman at redhat dot com

--- Comment #10 from Stephan Bergmann <sbergman at redhat dot com> ---
(In reply to Jason Merrill from comment #8)
> 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.

Starting with that commit,

  constexpr int f() { return 0; }
  bool b = f() != 0xFFFFFFFFU;

now emits a -Wsign-compare, while the similar

  constexpr int f() { return 0; }
  constexpr int n = f();
  bool b = n != 0xFFFFFFFFU;

still does not.

I assume that is an unintended regression?

Reply via email to