xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* open-coded offsetof() in xen/include/public/ring.h
@ 2010-02-23 14:07 Jan Beulich
  2010-02-23 14:30 ` Keir Fraser
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2010-02-23 14:07 UTC (permalink / raw)
  To: xen-devel

Using gcc 4.5 we're seeing a build failure of the netfront driver due to
its use of the __RING_SIZE() macro in the size specification of array
members of struct netfront_info. Since the use of pointer types in
integer constant expressions is an extension (albeit one - for the
specific form used here - so far supported by all compilers Xen
appears to be used with, and certainly all of the ones I was able to
test), I wonder whether requiring offsetof() to be defined in order
to use __RING_SIZE (or really a clone thereof usable in constant
expressions, since in that case a type rather than a pointer ought to
be passed in) would be acceptable.

Jan

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: open-coded offsetof() in xen/include/public/ring.h
  2010-02-23 14:07 open-coded offsetof() in xen/include/public/ring.h Jan Beulich
@ 2010-02-23 14:30 ` Keir Fraser
  0 siblings, 0 replies; 2+ messages in thread
From: Keir Fraser @ 2010-02-23 14:30 UTC (permalink / raw)
  To: Jan Beulich, xen-devel@lists.xensource.com

On 23/02/2010 14:07, "Jan Beulich" <JBeulich@novell.com> wrote:

> Using gcc 4.5 we're seeing a build failure of the netfront driver due to
> its use of the __RING_SIZE() macro in the size specification of array
> members of struct netfront_info. Since the use of pointer types in
> integer constant expressions is an extension (albeit one - for the
> specific form used here - so far supported by all compilers Xen
> appears to be used with, and certainly all of the ones I was able to
> test), I wonder whether requiring offsetof() to be defined in order
> to use __RING_SIZE (or really a clone thereof usable in constant
> expressions, since in that case a type rather than a pointer ought to
> be passed in) would be acceptable.

That would be acceptable. We already require some things like stdint types
to be pre-defined for example.

 -- Keir

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-02-23 14:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-23 14:07 open-coded offsetof() in xen/include/public/ring.h Jan Beulich
2010-02-23 14:30 ` Keir Fraser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).