This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [4.5] PR32061 PR36954 Wlogical-op fixes
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Manuel López-Ibáñez <lopezibanez at gmail dot com>
- Cc: Gcc Patch List <gcc-patches at gcc dot gnu dot org>, Tom Truscott <Tom dot Truscott at sas dot com>
- Date: Wed, 18 Feb 2009 15:48:21 +0000 (UTC)
- Subject: Re: [4.5] PR32061 PR36954 Wlogical-op fixes
- References: <6c33472e0902180512p108b2323r6533a646cbd3a66b@mail.gmail.com>
On Wed, 18 Feb 2009, Manuel López-Ibáñez wrote:
> The following patch makes Wlogical-op warn less (in particular, not
> warn for op && 1 or op && 0), it fixes two bugs and it also enables it
> with Wextra. It also changes the wording of the warning from:
>
> logical '&&' with non-zero constant will always evaluate as true
> logical '||' with non-zero constant will always evaluate as true
>
> to:
>
> logical 'and' applied to non-boolean constant
> logical 'or' applied to non-boolean constant
>
> Bootstrapped and regression tested on x86_64-unknown-linux-gnu.
>
> OK for 4.5?
The C parts are OK for 4.5.
--
Joseph S. Myers
joseph@codesourcery.com