This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFA][PATCH] Fix building cr16-elf with trunk compiler
- From: Marek Polacek <polacek at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Bernd Schmidt <bschmidt at redhat dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 30 Sep 2015 19:10:11 +0200
- Subject: Re: [RFA][PATCH] Fix building cr16-elf with trunk compiler
- Authentication-results: sourceware.org; auth=none
- References: <560B0762 dot 9090902 at redhat dot com> <560BD880 dot 5070505 at redhat dot com> <20150930124515 dot GJ6184 at redhat dot com> <560C155A dot 9070503 at redhat dot com>
On Wed, Sep 30, 2015 at 11:01:14AM -0600, Jeff Law wrote:
> On 09/30/2015 06:45 AM, Marek Polacek wrote:
> >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? :(
> If you want to dive into it, be my guest :-0 Attached is a suitable .ii
> file.
All right, let me take a look.
Marek