[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] xen: Minor modifications to platform.h to make it C++-friendly

>>> On 23.02.15 at 12:09, <tim@xxxxxxx> wrote:
> At 10:54 +0000 on 23 Feb (1424685241), Jan Beulich wrote:
>> ... this should be moved out to file scope too, both for consistency
>> and to avoid an eventual further adjustment going forward. Otoh
>> I'm not convinced we need the headers to be C++ ready (nor am
>> I convinced that there aren't any other obstacles preventing their
>> unmodified use in C++). Co-maintainers, what do you think?
> In general I'm against making C code uglier to keep C++ compilers
> happy (e.g. ISTR vetoing the idea of putting 'extern C' runes in our
> header files a while back).  And we certainly don't _support_ the
> header files as C++.
> OTOH, I think that just defining struct xenpf_efi_guid and struct
> xenpf_efi_time at file scope would be fine here -- if anything it's
> nicer to have these reused structs defined before first use.
> And if it happens to solve a problem for C++, too, that's great. :)

But then I'd ask for consistency again - there are a couple of
other similar structure definitions as it seems. And other than full
C++ correctness I can't see how such a rule could be auto-
enforced (to avoid introducing similar future issues - personally
I'm in favor of defining things upon first use where possible, i.e.
I'd be likely to introduce such "nested" structure definitions again
unless prevented from doing so by some automatic check).


Xen-devel mailing list



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