[Top][All Lists]

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

Re: [Qemu-devel] [PATCH 04/67] s390x: drop an unused include

From: Thomas Huth
Subject: Re: [Qemu-devel] [PATCH 04/67] s390x: drop an unused include
Date: Tue, 8 May 2018 16:17:09 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 08.05.2018 16:06, Philippe Mathieu-Daudé wrote:
> On 05/08/2018 10:50 AM, Thomas Huth wrote:
>> On 08.05.2018 15:45, Cornelia Huck wrote:
>>> On Tue, 8 May 2018 15:38:03 +0200
>>> Thomas Huth <address@hidden> wrote:
>>>> On 08.05.2018 15:23, Cornelia Huck wrote:
>>>>> Hm, I'm wondering why we do the typedef in cpu-qom.h, while other
>>>>> architectures do it in their cpu.h.  
>>>> See:
>>>> commit ef2974cc270d51959ce90df6b4d4d41635d7a603
>>>> Author: David Hildenbrand <address@hidden>
>>>> Date:   Wed Sep 13 15:24:02 2017 +0200
>>>>     target/s390x: move some s390x typedefs to cpu-qom.h
>>>>     This allows us to drop inclusion of cpu_models.h in cpu-qom.h, and
>>>>     prepares for using cpu-qom.h as a s390 specific version of typedefs.h
>>>>     Signed-off-by: David Hildenbrand <address@hidden>
>>>>     Message-Id: <address@hidden>
>>>>     Reviewed-by: Thomas Huth <address@hidden>
>>>>     Signed-off-by: Cornelia Huck <address@hidden>
>>>>  Thomas
>>> Gargh, this is all very confusing...
>> If you'd ask me, I'd say we should get rid of the typedefs and do it the
>> Linux kernel way and enforce using "struct xyz" everywhere, then you
>> also do not have this problem with typedefs.h anymore ... but well, so
>> far it seems as I'm still part of a minority with this opinion here.
> Maybe not getting rid of the typedefs, but I agree with removing typedefs.h.

But you need a way to do forward declarations ... thus you need
something like typedefs.h as long as you use typedefs. Otherwise older
versions of GCC will choke on multiple "typedef struct XyZ XyZ" statements.


reply via email to

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