[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



Hi Jan,

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.

Regards,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.