From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49826) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUCgs-0001q0-1O for qemu-devel@nongnu.org; Sat, 07 Mar 2015 06:14:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YUCgo-00024l-SR for qemu-devel@nongnu.org; Sat, 07 Mar 2015 06:14:41 -0500 Received: from mail-wi0-x233.google.com ([2a00:1450:400c:c05::233]:37954) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUCgo-00024e-Kx for qemu-devel@nongnu.org; Sat, 07 Mar 2015 06:14:38 -0500 Received: by widex7 with SMTP id ex7so8364554wid.3 for ; Sat, 07 Mar 2015 03:14:37 -0800 (PST) Sender: Paolo Bonzini Message-ID: <54FADD98.8080509@redhat.com> Date: Sat, 07 Mar 2015 12:14:32 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] clang warnings too noisy List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , qemu-devel , Stefan Hajnoczi 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