[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/5] compiler: support Darwin weak references
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 1/5] compiler: support Darwin weak references |
Date: |
Fri, 2 Nov 2012 14:46:02 +0100 |
On 2 November 2012 14:14, Paolo Bonzini <address@hidden> wrote:
> Weakrefs only tell you if the symbol was defined elsewhere, so you
> need a further check at runtime to pick the default definition
> when needed.
>
> This could be automated by the compiler, but it does not do it.
clang doesn't error out anymore, but this version still provokes
a warning:
CC osdep.o
osdep.c:85:1: warning: unused function
'weak_monitor_fdset_dup_fd_find' [-Wunused-function]
QEMU_WEAK_ALIAS(monitor_fdset_dup_fd_find, default_fdset_dup_fd_find);
^
./compiler.h:55:32: note: expanded from macro 'QEMU_WEAK_ALIAS'
static typeof(oldname) weak_##newname __attribute__((weakref(#oldname)))
^
<scratch space>:147:1: note: expanded from macro 'weak_'
weak_monitor_fdset_dup_fd_find
^
1 warning generated.
-- PMM