From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51746) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8soW-0008SA-IQ for qemu-devel@nongnu.org; Tue, 15 Dec 2015 11:51:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8soS-00042O-Fr for qemu-devel@nongnu.org; Tue, 15 Dec 2015 11:51:00 -0500 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]:38727) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8soS-00042J-8o for qemu-devel@nongnu.org; Tue, 15 Dec 2015 11:50:56 -0500 Received: by mail-wm0-x22a.google.com with SMTP id l126so2511206wml.1 for ; Tue, 15 Dec 2015 08:50:56 -0800 (PST) Sender: Paolo Bonzini References: <1450189710-18264-1-git-send-email-pbonzini@redhat.com> From: Paolo Bonzini Message-ID: <567044EB.7030009@redhat.com> Date: Tue, 15 Dec 2015 17:50:51 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [RFC PATCH 0/6] decouple board headers from cpu.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers On 15/12/2015 17:06, Peter Maydell wrote: > > These patches are perhaps the only somewhat controversial part. > > Generally, we add opaque typedefs to typedefs.h in order to avoid > > indirect header inclusions. However, this might not be desirable > > for target specific types such as FooCPU. These types are used > > mostly in headers for boards, and thus this series uses struct > > explicitly in those headers. Adding a typedef breaks on older > > compilers that do not like redefinitions of typedefs. > > I would prefer us to provide the typedef. There's no problem > with older compilers because you just only define the typedef > in one place (typically in typedefs.h). typedefs.h generally has target-independent types only (the only exception is AllwinnerAHCIState; plus FWCfg* and uWireSlave are close misses). I thought about adding target-arm/typedefs.h or hw/arm/typedefs.h, but it seemed weird to do that for one type only. But yes, we can do that too. I went this way first just to check how many files were affected. Paolo