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] Fix trunk bootstrap on darwin following the commit for PR16302


2009/5/16 Simon Martin <simartin@users.sourceforge.net>:
> Hello Manuel,
>
>> Is it really 0? ?The patch tries to not warn for constants. I will
>> rather fix the warning. Could you produce a small testcase?
>
> "gcc -E" shows that it really is "target_flags & 0".
>
> Here's a small test case.
>
> === cut ===
> extern int foo, bar;
>
> #define ZERO (bar & 0) ? ?// <- The warning shows

We could either try to detect this case in particular or only warn for
relation/logical operators. I wonder what make_range is actually
seeing and what is generating. Alternatively, we could not warn if one
of the expressions is always true or always false.

Cheers,

Manuel.


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