[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [Qemu-devel] [PATCH for-3.1?] target/arm/sve_helper: Fix
From: |
Peter Maydell |
Subject: |
Re: [Qemu-arm] [Qemu-devel] [PATCH for-3.1?] target/arm/sve_helper: Fix compilation with clang 3.4 |
Date: |
Wed, 28 Nov 2018 15:54:44 +0000 |
On Wed, 28 Nov 2018 at 15:50, Philippe Mathieu-Daudé <address@hidden> wrote:
>
> On 28/11/18 15:39, Thomas Huth wrote:
> > On 2018-11-28 15:34, Philippe Mathieu-Daudé wrote:
> >> On 28/11/18 10:58, Thomas Huth wrote:
> >>> Clang 3.4 does not know the "flatten" attribute yet. We've already
> >>> introduced the QEMU_FLATTEN macro for this in commit 97ff87c0ed020c2,
> >>> so use this macro now here, too, to fix this issue.
> >>
> >> checkpatch candidate?
> >
> > I think we'd rather need a docker-based test with such an old version of
> > Clang... (since there are also other issues like the double-typedef
> > problem that regularly occurs there).
>
> I was thinking of something such (broken code!):
>
> if ($line =~ /.*__attribute__\w+\(\(flatten\)\)/) {
> ERROR("Use QEMU_FLATTEN ...\n");
> }
If you wanted to go down that path then it might be best to
opt for "warn about any use of __attribute__ outside compiler.h,
perhaps with a whitelist of known-ok attributes".
thanks
-- PMM