On Wed, Sep 30, 2015 at 02:41:36PM +0200, Bernd Schmidt wrote:
> On 09/29/2015 11:49 PM, Jeff Law wrote:
> >
> >This code from builtins.c:
> >
> > /* If we don't need too much alignment, we'll have been guaranteed
> > proper alignment by get_trampoline_type. */
> > if (TRAMPOLINE_ALIGNMENT <= STACK_BOUNDARY)
> > return tramp;
> >
> >
> >It's entirely conceivable that TRAMPOLINE_ALIGNMENT will be the same as
> >STACK_BOUNDARY. And if they are, then -Wtautological-compare will
> >complain bitterly.
>
> Eww. Can we fix the warning not to complain when the comparison involves
> macros?
It already has
/* Don't warn for various macro expansions. */
if (from_macro_expansion_at (loc)
|| from_macro_expansion_at (EXPR_LOCATION (lhs))
|| from_macro_expansion_at (EXPR_LOCATION (rhs)))
return;
and also
/* We do not warn for constants because they are typical of macro
expansions that test for features, sizeof, and similar. */
if (CONSTANT_CLASS_P (lhs) || CONSTANT_CLASS_P (rhs))
return;
so why does it warn? :(
Marek