From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Clang tools build Date: Fri, 12 Feb 2016 15:25:29 +0000 Message-ID: <56BDF969.9010701@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel List , Jan Beulich , Ian Campbell , Ian Jackson , Wei Liu List-Id: xen-devel@lists.xenproject.org Hello, Now that Clang 3.5 can build the hypervisor, I was just preparing a patch to README, and encountered this: In file included from xc_altp2m.c:23: In file included from ./xc_private.h:35: In file included from ./include/xenctrl.h:53: /local/xen.git/tools/libxc/../../tools/include/xen/foreign/x86_64.h:203:47: error: 'aligned' attribute ignored when parsing type [-Werror,-Wignored-attributes] __align8__ uint64_t evtchn_pending[sizeof(__align8__ uint64_t) * 8]; ^~~~~~~~~~ /local/xen.git/tools/libxc/../../tools/include/xen/foreign/x86_64.h:13:36: note: expanded from macro '__align8__' # define __align8__ __attribute__((aligned (8))) ^~~~~~~~~~~ /local/xen.git/tools/libxc/../../tools/include/xen/foreign/x86_64.h:204:44: error: 'aligned' attribute ignored when parsing type [-Werror,-Wignored-attributes] __align8__ uint64_t evtchn_mask[sizeof(__align8__ uint64_t) * 8]; ^~~~~~~~~~ /local/xen.git/tools/libxc/../../tools/include/xen/foreign/x86_64.h:13:36: note: expanded from macro '__align8__' # define __align8__ __attribute__((aligned (8))) ^~~~~~~~~~~ 2 errors generated. In this case, Clang is complaining that the alignment attribute is wrong for uint64_t. This is correct for 64bit compilations, but wrong for 32bit. On the other hand, I am not sure whether it is sensible to do a blanket disable of -Wignored-attributes. Thoughts? ~Andrew