This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix trunk bootstrap on darwin following the commit for PR16302
2009/5/16 Simon Martin <firstname.lastname@example.org>:
> 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.