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

Re: [Xen-devel] [PATCH 2/2] x86/cpu: Improvements to get_cpu_vendor()



On 01/04/2017 08:33 AM, Jan Beulich wrote:
>>>> On 03.01.17 at 13:06, <andrew.cooper3@xxxxxxxxxx> wrote:
>> --- a/xen/arch/x86/cpu/cpu.h
>> +++ b/xen/arch/x86/cpu/cpu.h
>> @@ -1,9 +1,13 @@
>>  /* attempt to consolidate cpu attributes */
>>  struct cpu_dev {
>> -    char    * c_vendor;
>> +    char    c_vendor[8];
>>  
>> -    /* some have two possibilities for cpuid string */
>> -    char    * c_ident[2];   
>> +    union {
>> +            char    c_ident[13];
>> +            struct {
>> +                    uint32_t b, d, c;
>> +            };
>> +    };
> This broke the build with at least gcc 4.3.x, which doesn't allow
> initializers for unnamed struct/union.

4.4 is also broken. I believe anonymous initializers were added in gcc 4.6.


-boris

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

 


Rackspace

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