From: Ian Campbell Subject: Re: [PATCH 06/15] libxl: permit declaration after statement Date: Thu, 8 Dec 2011 20:40:38 +0000 Message-ID: <1323376838.20936.3.camel@dagon.hellion.org.uk> References: <1323108621-22654-1-git-send-email-ian.jackson@eu.citrix.com> <1323108621-22654-7-git-send-email-ian.jackson@eu.citrix.com> <1323266816.23681.189.camel@zakaz.uk.xensource.com> <20192.65274.13650.451424@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20192.65274.13650.451424@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Thu, 2011-12-08 at 18:16 +0000, Ian Jackson wrote: > Ian Campbell writes ("Re: [Xen-devel] [PATCH 06/15] libxl: permit declaration after statement"): > > I'm happy with this so far as it goes but I was wondering where the > > original -Wdeclaration-after-statement came from, do we actually mean > > "-std=c99" or something along those lines? > > gcc -O1 -fno-omit-frame-pointer -m32 -march=i686 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement -D__XEN_TOOLS__ -MMD -MF .libxl.o.d -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fno-optimize-sibling-calls -mno-tls-direct-seg-refs -Werror -Wno-format-zero-length -Wmissing-declarations -I. -fPIC -I/u/iwj/work/2/xen-unstable.git/tools/libxl/../../tools/libxc -I/u/iwj/work/2/xen-unstable.git/tools/libxl/../../tools/include -I/u/iwj/work/2/xen-unstable.git/tools/libxl/../../tools/libxc -I/u/iwj/work/2/xen-unstable.git/tools/libxl/../../tools/include -I/u/iwj/work/2/xen-unstable.git/tools/libxl/../../tools/xenstore -I/u/iwj/work/2/xen-unstable.git/tools/libxl/../../tools/include -I/u/iwj/w ork/2/xen-unstable.git/tools/libxl/../../tools/blktap2/control -I/u/iwj/work/2/xen-unstable.git/tools/libxl/../../tools/blktap2/include -I/u/iwj/work/2/xen-unstable.git/tools/libxl/../../tools/include -c -o libxl.o libxl.c > > So cutting that down to the relevant bits: > > gcc ... -std=gnu99 -Wall ... -Wdeclaration-after-statement ... -Werror ... > > The -Wdeclaration-after-statement comes from Config.mk: > > $(call cc-option-add,HOSTCFLAGS,HOSTCC,-Wdeclaration-after-statement) > $(call cc-option-add,CFLAGS,CC,-Wdeclaration-after-statement) > > So I think that since what we're doing is having a different rule for > libxl, it's right to put it in libxl's makefile. Agreed, I didn't realise this warning came from a different bit of Xen's build machinery. Ian.