From: Paolo Bonzini <pbonzini@redhat.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
qemu-devel@nongnu.org, jan.kiszka@siemens.com
Subject: Re: [Qemu-devel] [PATCH v2 0/5] Fixes for thread pool patches.
Date: Sat, 03 Nov 2012 16:51:44 +0100 [thread overview]
Message-ID: <50953D90.1010002@redhat.com> (raw)
In-Reply-To: <CAAu8pHunFDKWzkCosZrNfPM6d-Wmg3gTGe4g3qmNHT82DRsn4w@mail.gmail.com>
Il 03/11/2012 16:26, Blue Swirl ha scritto:
>> > It's a clang bug. The error should be suppressed, since the function is
>> > used with the weak alias.
>> >
>> > Or try if adding "|| defined __clang__" to compiler.h fixes it.
> It does.
Yeah, I tested now Clang/Linux myself and reported it as
http://llvm.org/bugs/show_bug.cgi?id=14250. With a simple testcase such
as this:
static int g()
{
return 42;
}
typeof(g) f __attribute__((__weak__, __alias__("g")));
it's easy to see that the function is actually emitted---and with "g" as
the name, even:
.file "g2.c"
.text
.align 16, 0x90
.type g,@function
g: # @g
.cfi_startproc
# BB#0:
movl $42, %eax
ret
.Ltmp0:
.size g, .Ltmp0-g
.cfi_endproc
.weak f
f = g
.section ".note.GNU-stack","",@progbits
> Maybe __APPLE__ should be replaced by __clang__, or can the
> problem also occur with GCC on Apple systems?
It can occur with GCC, though it will be just a "note" if I understand
correctly and not fail with -Werror. No idea whether the generated code
would run, probably not.
My favorite fix is to just disable the warning, otherwise make the
function inline.
Paolo
prev parent reply other threads:[~2012-11-03 15:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-02 14:43 [Qemu-devel] [PATCH v2 0/5] Fixes for thread pool patches Paolo Bonzini
2012-11-02 14:43 ` [Qemu-devel] [PATCH v2 1/5] compiler: support Darwin weak references Paolo Bonzini
2012-11-05 7:50 ` TeLeMan
2012-11-02 14:43 ` [Qemu-devel] [PATCH v2 2/5] semaphore: implement fallback counting semaphores with mutex+condvar Paolo Bonzini
2012-11-02 14:43 ` [Qemu-devel] [PATCH v2 3/5] qemu-timer: reinitialize timers after fork Paolo Bonzini
2012-11-02 14:43 ` [Qemu-devel] [PATCH v2 4/5] vl: unify calls to init_timer_alarm Paolo Bonzini
2012-11-02 14:43 ` [Qemu-devel] [PATCH v2 5/5] vl: delay thread initialization after daemonization Paolo Bonzini
2012-11-02 15:12 ` [Qemu-devel] [PATCH v2 0/5] Fixes for thread pool patches Peter Maydell
2012-11-03 11:50 ` Blue Swirl
2012-11-03 14:19 ` Paolo Bonzini
2012-11-03 14:24 ` Paolo Bonzini
2012-11-03 15:26 ` Blue Swirl
2012-11-03 15:51 ` Paolo Bonzini [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=50953D90.1010002@redhat.com \
--to=pbonzini@redhat.com \
--cc=blauwirbel@gmail.com \
--cc=jan.kiszka@siemens.com \
--cc=peter.maydell@linaro.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.