qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 00/14] More #include cleanups


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 00/14] More #include cleanups
Date: Tue, 9 Feb 2016 10:10:47 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0

On 02/09/2016 09:21 AM, Peter Maydell wrote:
> On 9 February 2016 at 16:11, Eric Blake <address@hidden> wrote:
>> But failed testing:
>>
>>   CC    disas/arm.o
>>   CXX   disas/arm-a64.o
>> In file included from /usr/include/c++/5.3.1/cmath:41:0,
>>                  from /home/eblake/qemu-tmp/disas/libvixl/vixl/utils.h:31,
>>                  from
>> /home/eblake/qemu-tmp/disas/libvixl/vixl/a64/disasm-a64.h:31,
>>                  from disas/arm-a64.cc:25:
>> /usr/include/c++/5.3.1/x86_64-redhat-linux/bits/c++config.h:1991:10:
>> error: expected unqualified-id before ‘namespace’
>>    inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { }
>>           ^
>>
>> Not sure what went wrong there, but 3/14 probably needs tweaking.
> 
> Weird. Your machine does compile libvixl right in current master?
> The patch does build fine for me, and it's not clear to me why
> moving the disasm-a64.h include below osdep.h and disas/bfd.h
> would make it stop building. Google suggests that missing
> semicolons can provoke this kind of error so maybe there's
> a latent error in the headers somewhere :-(

Yes, I bisected to 3/14; where things compiled after 1/14 (and 2/14 is
already in-tree).

Looking at the c++config.h header, I see a context of:

#if _GLIBCXX_USE_CXX11_ABI
namespace std
{
  inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { }
}

Comparing pre- and post-patch on the preprocessor output, it used to
expand to:

# 1989 "/usr/include/c++/5.3.1/x86_64-redhat-linux/bits/c++config.h" 3
namespace std
{
  inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { }
}

but with the new header order it expands to:

# 1989 "/usr/include/c++/5.3.1/x86_64-redhat-linux/bits/c++config.h" 3
namespace std
{

# 1991 "/usr/include/c++/5.3.1/x86_64-redhat-linux/bits/c++config.h"
 __attribute__ (( always_inline )) __inline__
# 1991 "/usr/include/c++/5.3.1/x86_64-redhat-linux/bits/c++config.h" 3
        namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { }
}

So _something_ in osdep.h is redefining 'inline' with disastrous effects
to C++.


-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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