On 06/07/2015 10:58, Peter Crosthwaite wrote: >> > Which compiler version started implementing anonymous structs? >> > > ISO C11 standardises it apparently. But various parts of the tree use > them now. target-arm/cpu.h, target-i386/kvm.c, > linux-user/syscall_defs.h and linux-headers/linux/kvm.h have liberal > use to name a few. I have seen it used in devs from time to time for > unionifying individual registers with an array form for SW access. > > This led me to consider it open season on anonymous structs and unions.
Ok, I wasn't sure about anonymous structs. We definitely use anonymous unions a lot. >> > Or can we just add >> > >> > __attribute__((__aligned__(1 << CPU_TLB_ENTRY_BITS))) >> > > Is that more or less standard than anonymous structs? Not standard (though there is something in C11 too) but decades old as a GCC extension. Paolo