WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] unnamed union structure members are dangerous to

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] unnamed union structure members are dangerous to expose in public headers
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
Date: Tue, 25 Mar 2008 17:42:48 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 25 Mar 2008 10:44:05 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C40EE801.1E514%keir.fraser@xxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
References: <20080325172534.GD6845@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <C40EE801.1E514%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
Keir Fraser, le Tue 25 Mar 2008 17:33:53 +0000, a écrit :
> On 25/3/08 17:25, "Samuel Thibault" <samuel.thibault@xxxxxxxxxxxxx> wrote:
> 
> > will return 0x13e0 when compiled without gcc -std=c99, while the
> > expected value is 0x1430, resulting to seg faults and all kinds of
> > tricks.  Compiling with
> > 
> > #include "/usr/include/xen/foreign/x86_64.h"
> > 
> > shows why:
> > 
> > /usr/include/xen/foreign/x86_64.h:88: warning: declaration does not
> > declare anything
> 
> This raises two obvious questions:
>  1. Why building with -std=c99?

Because in the wild public world, people may want to.

>  2. Why building without -Werror?

That wouldn't produce an error: the warning only appears when including
with "" instead of <>, so that gcc spits warnings of the header itself.

Samuel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>