From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34551) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTBze-00068i-En for qemu-devel@nongnu.org; Mon, 07 Oct 2013 10:41:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTBzZ-0007b1-VU for qemu-devel@nongnu.org; Mon, 07 Oct 2013 10:41:06 -0400 Received: from mel.act-europe.fr ([194.98.77.210]:37404 helo=smtp.eu.adacore.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTBzZ-0007aS-P1 for qemu-devel@nongnu.org; Mon, 07 Oct 2013 10:41:01 -0400 Message-ID: <5252C7FB.5040500@adacore.com> Date: Mon, 07 Oct 2013 16:40:59 +0200 From: Fabien Chouteau MIME-Version: 1.0 References: <1380905823-3981-1-git-send-email-chouteau@adacore.com> <1380905823-3981-4-git-send-email-chouteau@adacore.com> <525288C9.3080207@adacore.com> <5252B1D6.9050109@adacore.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 3/4] Refactoring MonitorDef array List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Luiz Capitulino , QEMU Developers , =?UTF-8?B?QW5kcmVhcyBGw6RyYmU=?= =?UTF-8?B?cg==?= On 10/07/2013 03:29 PM, Peter Maydell wrote: > On 7 October 2013 22:06, Fabien Chouteau wrote: >> On 10/07/2013 01:45 PM, Peter Maydell wrote: >>> On 7 October 2013 19:11, Fabien Chouteau wrote= : >>>> On 10/04/2013 07:49 PM, Peter Maydell wrote: >>>>> On 5 October 2013 01:57, Fabien Chouteau wro= te: >>>>>> +extern const MonitorDef i386_monitor_defs[]; >>>>> >>>>> Declare this in cpu-qom.h, rather than having an >>>>> extern declaration in a .c file. >=20 >> Sorry I sent the email too quickly. It looks like a circular dependenc= y >> >> In file included from /home/chouteau/src/qemu-main/target-arm/cpu.h:29= 4:0, >> from /home/chouteau/src/qemu-main/include/monitor/mon= itor_def.h:4, >> from /home/chouteau/src/qemu-main/target-arm/monitor.= c:20: >> /home/chouteau/src/qemu-main/target-arm/cpu-qom.h:184:25: error: array= type has incomplete element type >> make[1]: *** [target-arm/monitor.o] Error 1 >=20 > I think you should be able to declare it as > extern const MonitorDef *i386_monitor_defs; >=20 > then you don't need to include monitor_def.h from cpu-qom.h. > (untested, but the typedef should be sufficient for this) >=20 /home/chouteau/src/qemu-main/target-arm/monitor.c:22:19: error: conflicti= ng types for =E2=80=98arm_monitor_defs=E2=80=99 /home/chouteau/src/qemu-main/target-arm/cpu-qom.h:183:26: note: previous = declaration of =E2=80=98arm_monitor_defs=E2=80=99 was here cpu-qom.h is indirectly included in target-arm/monitor.c --=20 Fabien Chouteau