This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCHv3, resent] Add a warning for suspicious use of conditional expressions in boolean context
On 9/20/16, Trevor Saunders <tbsaunde@tbsaunde.org> wrote:
> On Wed, Sep 21, 2016 at 01:13:41AM +0200, Bernd Schmidt wrote:
>> On 09/21/2016 01:09 AM, Trevor Saunders wrote:
>> >
>> > I thought I remember discussing this macro with you, but see what was
>> > checked in I'll believe I'm thinking of something similar but
>> > different.
>>
>> I think this here was an earlier patch and the one we were discussing
>> recently was the other macro with a similar name.
>>
>> > Any way sorry about the dumb bug
>>
>> Stuff like this happens, no worries. But I've seen it happen a lot over the
>> years, and maybe you can see in this an explanation of why I'm often not the
>> most enthusiastic supporter of pure cleanup patches (those not motivated by
>> more substantial patches depending on them).
>
> yeah, there's always some risk, though I also believe if you define
> something as cleaning up then it has some value compared to pointless
> permutation. Ironically I think one of the big motivating reasons to
> remove ifdefs is to remove a source of bustage.
>
> Trev
>
This is kinda changing the topic a bit, but if removing ifdefs is to
remove bustage, maybe GCC should start compiling with -Wundef to
ensure that the ifdef removal doesn't actually introduce any new
bustage? Glibc started using -Wundef for that reason:
https://sourceware.org/ml/libc-alpha/2014-02/msg00828.html
https://www.sourceware.org/ml/libc-alpha/2015-08/msg00751.html
- References:
- Re: [PATCHv3, resent] Add a warning for suspicious use of conditional expressions in boolean context
- Re: [PATCHv3, resent] Add a warning for suspicious use of conditional expressions in boolean context
- Re: [PATCHv3, resent] Add a warning for suspicious use of conditional expressions in boolean context
- Re: [PATCHv3, resent] Add a warning for suspicious use of conditional expressions in boolean context
- Re: [PATCHv3, resent] Add a warning for suspicious use of conditional expressions in boolean context
- Re: [PATCHv3, resent] Add a warning for suspicious use of conditional expressions in boolean context
- Re: [PATCHv3, resent] Add a warning for suspicious use of conditional expressions in boolean context
- Re: [PATCHv3, resent] Add a warning for suspicious use of conditional expressions in boolean context
- Re: [PATCHv3, resent] Add a warning for suspicious use of conditional expressions in boolean context
- Re: [PATCHv3, resent] Add a warning for suspicious use of conditional expressions in boolean context
- Re: [PATCHv3, resent] Add a warning for suspicious use of conditional expressions in boolean context