This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, updated] Add a warning for suspicious use of conditional expressions in boolean context


On 09/15/16 18:23, Jeff Law wrote:
> On 09/15/2016 10:00 AM, Bernd Edlinger wrote:
>> On 09/15/16 17:44, Jeff Law wrote:
>>> On 09/14/2016 12:11 PM, Jason Merrill wrote:
>>>>
>>>> I think we could have both, where the weaker form is part of -Wall and
>>>> people can explicitly select the stronger form.
>>> That's been a fairly standard way to handle this kind of thing.  It
>>> works for me.
>>>
>>> Jeff
>>
>> The warning could for instance be more aggressive when -pedantic is in
>> effect?
> I wouldn't do it on -pedantic.  We've usually used levels or -Wfoo
> -Wfoo-bar kinds of schemes.

It would be kind of good to enable the extended warning level on
the gcc bootstrap, where we have -Wall and -pedantic and more.

So level 1 could be enabled with -Wall and level 2 could be enabled
with -pedantic and/or -Wpedantic.


Bernd.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]