Re: [PATCH #2] PR c/102245: Disable sign-changing optimization for shifts by zero.

2021-09-17 Thread Richard Biener via Gcc-patches
On Tue, Sep 14, 2021 at 9:44 AM Roger Sayle wrote: > > > Respecting Jakub's suggestion that it may be better to warn-on-valid for > "if (x << 0)" as the author might have intended "if (x < 0)" [which will > also warn when x is _Bool], the simplest way to resolve this regression > is to disable the

[PATCH #2] PR c/102245: Disable sign-changing optimization for shifts by zero.

2021-09-14 Thread Roger Sayle
Respecting Jakub's suggestion that it may be better to warn-on-valid for "if (x << 0)" as the author might have intended "if (x < 0)" [which will also warn when x is _Bool], the simplest way to resolve this regression is to disable the recently added fold transformation for shifts by zero; these w