linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: linuxppc-dev@lists.ozlabs.org, joel@jms.id.au
Subject: Re: [PATCH] powerpc/math-emu: Fix building with clang
Date: Fri, 2 Nov 2018 13:44:14 -0500	[thread overview]
Message-ID: <20181102184413.GU5994@gate.crashing.org> (raw)
In-Reply-To: <CAKwvOd=3JFm+ReeJ5QfQJ77ypN6+qipB-3LfpVcK+umKud5dgA@mail.gmail.com>

On Fri, Nov 02, 2018 at 10:38:36AM -0700, Nick Desaulniers wrote:
> On Fri, Nov 2, 2018 at 10:34 AM Segher Boessenkool
> <segher@kernel.crashing.org> wrote:
> >
> > On Fri, Nov 02, 2018 at 02:07:13PM +1030, Joel Stanley wrote:
> > >   arch/powerpc/math-emu/fnmsub.c:46:2: error: invalid use of a cast in a
> > >   inline asm context requiring an l-value: remove the cast or build with
> > >   -fheinous-gnu-extensions
> >
> > (It is spelled lvalue).
> >
> > *All* of extended asm is a GNU extension, what is clang trying to say here?
> > Confused :-)
> 
> Isn't the result of a cast a temporary value?  Probably just need to
> move the case out of the inline asm block to a separate statement.
> Having the full backtrace should help.

The kernel's sfp-machine.h has casts in lvalues, inside macros.  All such
casts seem to be casts to compatible types (and if not, it probably won't
work with GCC either).


Segher

      reply	other threads:[~2018-11-02 18:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-02  3:37 [PATCH] powerpc/math-emu: Fix building with clang Joel Stanley
2018-11-02 16:54 ` Nick Desaulniers
2018-11-12 11:33   ` Joel Stanley
2018-11-12 12:43     ` Segher Boessenkool
2018-11-12 19:17     ` Nick Desaulniers
2018-11-02 17:34 ` Segher Boessenkool
2018-11-02 17:38   ` Nick Desaulniers
2018-11-02 18:44     ` Segher Boessenkool [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181102184413.GU5994@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=joel@jms.id.au \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=ndesaulniers@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).