qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] win32: provide separate macros for weak decls and definitions
Date: Tue, 04 Sep 2012 10:53:21 -0700	[thread overview]
Message-ID: <50464011.7050709@twiddle.net> (raw)
In-Reply-To: <1345000656-28955-1-git-send-email-aliguori@us.ibm.com>

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	other threads:[~2012-09-04 17:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-15  3:17 [Qemu-devel] [PATCH] win32: provide separate macros for weak decls and definitions Anthony Liguori
2012-09-04 17:53 ` Richard Henderson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50464011.7050709@twiddle.net \
    --to=rth@twiddle.net \
    --cc=aliguori@us.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).