qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH for-6.0? 0/6] extern "C" overhaul for C++ files


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH for-6.0? 0/6] extern "C" overhaul for C++ files
Date: Fri, 16 Apr 2021 16:56:08 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

Cc'ing MediaTek future contributors who expressed interest
in reviewing this.

On 4/16/21 3:55 PM, Peter Maydell wrote:
> Hi; this patchseries is:
>  (1) a respin of Paolo's patches, with the review issue Dan
>      noticed fixed (ie handle arm-a64.cc too)
>  (2) a copy of my "osdep.h: Move system includes to top" patch
>  (3) some new patches which try to more comprehensively address
>      the extern "C" issue
> 
> I've marked this "for-6.0?", but more specifically:
>  * I think patches 1 and 2 should go in if we do an rc4
>    (and maybe we should do an rc4 given various things that
>    have appeared that aren't individually rc4-worthy)
>  * patches 3-6 are definitely 6.1 material
> 
> We have 2 C++ files in the tree which need to include QEMU
> headers: disas/arm-a64.cc and disas/nanomips.cpp. These
> include only osdep.h and dis-asm.h, so it is sufficient to
> extern-C-ify those two files only.
> 
> I'm not wildly enthusiastic about this because it's pretty
> invasive (and needs extending if we ever find we need to
> include further headers from C++), but it seems to be what
> C++ forces upon us...
> 
> Patches 1, 2 and 3 have been reviewed (I kept Dan's r-by on
> patch 1 since the change to it is just fixing the thing he
> noticed). Further review, and opinions on the 6.0-ness, whether
> we should do an rc4, etc, appreciated.
> 
> thanks
> -- PMM
> 
> Paolo Bonzini (2):
>   osdep: include glib-compat.h before other QEMU headers
>   osdep: protect qemu/osdep.h with extern "C"
> 
> Peter Maydell (4):
>   include/qemu/osdep.h: Move system includes to top
>   osdep: Make os-win32.h and os-posix.h handle 'extern "C"' themselves
>   include/qemu/bswap.h: Handle being included outside extern "C" block
>   include/disas/dis-asm.h: Handle being included outside 'extern "C"'
> 
>  include/disas/dis-asm.h   | 12 ++++++++++--
>  include/qemu/bswap.h      | 26 ++++++++++++++++++++++----
>  include/qemu/compiler.h   |  6 ++++++
>  include/qemu/osdep.h      | 34 +++++++++++++++++++++++++++-------
>  include/sysemu/os-posix.h |  8 ++++++++
>  include/sysemu/os-win32.h |  8 ++++++++
>  disas/arm-a64.cc          |  2 --
>  disas/nanomips.cpp        |  2 --
>  8 files changed, 81 insertions(+), 17 deletions(-)
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]