From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38623) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8xJW-0003vB-JD for qemu-devel@nongnu.org; Tue, 04 Sep 2012 13:53:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T8xJV-0006k0-2l for qemu-devel@nongnu.org; Tue, 04 Sep 2012 13:53:26 -0400 Received: from mail-pz0-f45.google.com ([209.85.210.45]:46392) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8xJU-0006jq-Sa for qemu-devel@nongnu.org; Tue, 04 Sep 2012 13:53:24 -0400 Received: by dadn15 with SMTP id n15so4394801dad.4 for ; Tue, 04 Sep 2012 10:53:24 -0700 (PDT) Sender: Richard Henderson Message-ID: <50464011.7050709@twiddle.net> Date: Tue, 04 Sep 2012 10:53:21 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1345000656-28955-1-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1345000656-28955-1-git-send-email-aliguori@us.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] win32: provide separate macros for weak decls and definitions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org On 08/14/2012 08:17 PM, Anthony Liguori wrote: > Strangely, gcc on Linux absolutely does not want the declaration to be marked > as weak. Err... that's incorrect. > +CpuDefinitionInfoList GCC_WEAK_DECL *arch_query_cpu_definitions(Error **errp); ... and probably seen because you put the attribute in the wrong place. You've put the attribute in the middle of the return type, where it is attempting to be applied to the return type pointer. Try one of GCC_WEAK_DECL CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp); CpuDefinitionInfoList * GCC_WEAK_DECL arch_query_cpu_definitions(Error **errp); CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp) GCC_WEAK_DECL; I suspect all three alternatives will work. r~