From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60844) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZC2Gc-0005VQ-GF for qemu-devel@nongnu.org; Mon, 06 Jul 2015 05:00:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZC2GY-0001Vj-95 for qemu-devel@nongnu.org; Mon, 06 Jul 2015 05:00:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZC2GY-0001Vf-38 for qemu-devel@nongnu.org; Mon, 06 Jul 2015 05:00:42 -0400 References: <1436130533-18565-1-git-send-email-crosthwaite.peter@gmail.com> <559A3FA6.6010806@redhat.com> From: Paolo Bonzini Message-ID: <559A43B4.6050901@redhat.com> Date: Mon, 6 Jul 2015 11:00:36 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] cpu_defs: Simplify CPUTLB padding logic List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: Peter Crosthwaite , Peter Crosthwaite , "qemu-devel@nongnu.org Developers" , Richard Henderson 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