Am 07.03.2015 um 12:14 schrieb Paolo Bonzini:
On 07/03/2015 00:47, Peter Maydell wrote:
1. It complains about glib headers:
In file included from /home/stefanha/qemu/include/net/eth.h:32:
In file included from /home/stefanha/qemu/include/qemu/iov.h:17:
In file included from /home/stefanha/qemu/include/qemu-common.h:43:
In file included from /home/stefanha/qemu/include/glib-compat.h:19:
In file included from /usr/include/glib-2.0/glib.h:50:
In file included from /usr/include/glib-2.0/glib/ghash.h:33:
In file included from /usr/include/glib-2.0/glib/glist.h:32:
/usr/include/glib-2.0/glib/gmem.h:76:78: warning: unknown attribute
'__alloc_size__' ignored [-Wunknown-attributes]
gpointer g_malloc (gsize n_bytes) __attribute__((__malloc__))
__attribute__((__alloc_size__(1)));
                                                                              ^
/usr/include/glib-2.0/glib/gmem.h:78:79: warning: unknown attribute
'__alloc_size__' ignored [-Wunknown-attributes]
I think this is a glib bug...
If clang supports fewer attributes than GCC, the right course of action
is disabling the warning on clang.  There are very few attributes that
are used commonly and that affect ABI; most of them are just annotations.

Paolo

On Debian Jessie I don't get any of those warnings with clang.

I think we can focus clang support on those environmentswhich are
really needed: Mac OS X and Linux with sufficiently new distributions.
Then no action is necessary.

Stefan

Reply via email to