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: [C/C++/IRA] PR 16302 gcc fails to warn about some common logic errors


2009/5/19 H.J. Lu <hjl.tools@gmail.com>:
> On Sun, May 17, 2009 at 1:21 PM, Richard Guenther
> <richard.guenther@gmail.com> wrote:
>> On Sat, May 16, 2009 at 5:17 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>> 2009/5/16 Manuel López-Ibáñez <lopezibanez@gmail.com>:
>>>> That is strange, it should not warn for constants. Is it really 0 or
>>>> something else?
>>>
>>>
>>> I open a bug report with a testcase:
>>>
>>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40172
>>
>> Given all this and that bootstrap is still not fixed for some targets
>> I seriously
>> doubt this warning is worth all this trouble.
>>
>> Thus, I suggest to revert the patch or make the warning not part of -Wall.
>>
>
> How about this patch?

This just solves one instance of the problem. As long as we cannot
check for macro expansions, we will have the problem elsewhere. I am
ok with moving the warning out of Wextra. Much better than using
-Wno-logical-op, since this is likely to affect other programs, not
only GCC.

Mark, Joseph. Would a patch to move Wlogical-op out of Wextra be approved?

Cheers,

Manuel.


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