This question belongs on the gcc-help list really.

On 20 February 2018 at 14:44, Christophe de Dinechin
<dinec...@redhat.com> wrote:
> I wonder why -Wsign-compare only warns when there is no int promotion?

I suspect the correct-but-not-helpful answer is that after integer
promotion the operands have the same type, and so there's no
comparison between signed and unsigned types.

But the compiler could make the warning apply *before* doing integer
promotion, to diagnose this case.

Reply via email to