qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] win32: provide separate macros for weak decls a


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH] win32: provide separate macros for weak decls and definitions
Date: Tue, 04 Sep 2012 10:53:21 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0

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~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]