On Tue, Mar 09, 2021 at 07:24:32PM -0800, Elliott Mitchell wrote:
> On Tue, Mar 09, 2021 at 09:27:34PM +0000, Andrew Cooper wrote:
> > On 08/03/2021 13:36, Elliott Mitchell wrote:
> > > typeof() is available in Xen's build environment, which uses Xen's
> > > compiler.  As these headers are public, they need strict standards
> > > conformance.  Only __typeof__() is officially standardized.
> > >
> > > A compiler in standards conformance mode should report:
> > >
> > > warning: implicit declaration of function 'typeof' is invalid in C99
> > > [-Wimplicit-function-declaration]
> > >
> > > (this has been observed with FreeBSD's kernel build environment)
> > >
> > > Based-on-patch-by: Julien Grall <jul...@xen.org>, Sun Oct 4 20:33:04 2015 
> > > +0100
> > > Signed-off-by: Elliott Mitchell <ehem+...@m5p.com>
> > 
> > s!arm!xen/public! in the subject seeing as two thirds of the
> > modifications are in non-ARM headers.
> 
> Gah!  Crucial little detail missing when rewriting the subject line.
> Julien Grall's original patch/commit only did ARM, but when I checked I
> found the other two and I did them too.
> 
> 
> > Acked-by: Andrew Cooper <andrew.coop...@citrix.com>
> > 
> > This wants backporting as a build fix, so should be considered for 4.15
> > at this point.
> > 
> > I wonder why our header checks don't pick this up.?? Do we need to throw
> > a -pedantic around?
> 
> This came up since FreeBSD's kernel build uses Clang with
> -std=iso9899:1999.  When I found FreeBSD was simply copying Xen's headers
> it was clear this needed to be *here*.

FTR this was never spotted on x86 because we don't make use of any of
the macros that use typeof in the kernel. Arm OTOH has a typeof in
set_xen_guest_handle_raw which is used by kernel code.

Thanks for fixing those.

Thanks, Roger.

Reply via email to