From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Thibault Subject: Re: [PATCH] unnamed union structure members are dangerous to expose in public headers Date: Tue, 25 Mar 2008 17:42:48 +0000 Message-ID: <20080325174248.GS4411@implementation.uk.xensource.com> References: <20080325172534.GD6845@implementation.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Keir Fraser, le Tue 25 Mar 2008 17:33:53 +0000, a écrit : > On 25/3/08 17:25, "Samuel Thibault" 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