[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH for-4.6] xen/public: arm: Use __typeof__ rather than typeof
On Wed, 2015-10-07 at 00:31 -0600, Jan Beulich wrote: > > > > On 06.10.15 at 19:25, <julien.grall@xxxxxxxxxx> wrote: > > On 05/10/15 11:31, Jan Beulich wrote: > > > > > > On 04.10.15 at 21:24, <julien.grall@xxxxxxxxxx> wrote: > > > > The keyword typeof is not portable: > > > > > > > > /usr/src/freebsd/sys/xen/hypervisor.h:93:2: error: implicit > > > > declaration > > > > of function 'typeof' is invalid in C99 > > > > [-Werror,-Wimplicit-function-declaration] > > > > > > Actually, it's worse than that - typeof() is a gcc extension, and we > > > shouldn't use extensions in public headers without at least having > > > alternative code for not gcc compatible compilers in place. In fact > > > we should probably aim at removing the exclusion of public/arch-% > > > in the ANSI conformance check; IIRC I had to add it because things > > > wouldn't build without, but with the (then forgotten) goal of dealing > > > with this properly later on. > > > > I don't see how header.chk would have catch my issue. The problem is in > > the macro set_xen_guest_handle_raw which is not used within the headers > > (except by set_xen_guest_handle which is not used at all). > > > > It may be worth to add a dummy .c which call the macros to check they > > are ANSI compliant. > > Hmm, true, conformance of macros isn't being checked right now > (i.e. we only verify that the header as such compiles, not that > everything in the header can be used). A manually created source > would help only to some degree, as it would need to be kept up to > date with future additions. I.e. the long term solution probably > ought to be an at least partially machine generated source file It ought to be possible to at least automatically check that every #define ([A-Za-z_]+) is matched by a corresponding $1 in the .c file. > . I added this to my todo list (but towards the end of it). FWIW I have a similar issue with the headers checks for my split up libxenctrl stable libraries series, and it is in a similar place on my todo list... Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |