This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] [xen-4.0-testing test] 7147: regressions - FAIL

To: Keir Fraser <keir.xen@xxxxxxxxx>
Subject: Re: [Xen-devel] [xen-4.0-testing test] 7147: regressions - FAIL
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Mon, 23 May 2011 13:32:18 +0100
Cc: Olaf Hering <olaf@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Delivery-date: Mon, 23 May 2011 05:33:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C9FDF91A.1AC1F%keir.xen@xxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <C9FDF91A.1AC1F%keir.xen@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Sat, 2011-05-21 at 23:19 +0100, Keir Fraser wrote:
> Related to the -Wno-unused-but-set-variable patch. But this is weird because
> the compiler runs many times with this option quite happily, before failing
> on it as an unrecognised option much later in the build (building qemu in
> this case, or stubdom in the case of xen-unstable). Any ideas?

Weirdly it seems like the 
        unrecognized command line option "-Wno-unused-but-set-variable"
only shows up if the compiler has also generated a warning of some sort.
Since much of the xen tree is built with -Werror it is generally warning
free and so succeeds, but the stbudom and ioemu builds do not use Werror
and sodo have some warnings...

I noticed this because I made a change to hvmloader which caused a
warning, followed by this error. Having fixed the warning it now

It seems like gcc (at least in Debian Squeeze) does some sort of lazy
evaluation of -W options, which seems terribly unlikely but does seem to
be reality. Try compiling the following always with
-Wno-unused-but-set-variable but with and without -DHACK to see what I

$ gcc -Wno-unused-but-set-variable -DHACK ~/t.c
/home/ianc/t.c: In function 'main':
/home/ianc/t.c:6: warning: initialization makes pointer from integer without a 
At top level:
cc1: warning: unrecognized command line option "-Wno-unused-but-set-variable"
$ gcc -Wno-unused-but-set-variable ~/t.c
$ cat ~/t.c

#include <stdio.h>

int main(void)
#ifdef HACK
        void *p = 0x1234;
        void *p = NULL;
        printf("P is %p\n", p);



Xen-devel mailing list