xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@novell.com>
To: xen-devel@lists.xensource.com
Subject: open-coded offsetof() in xen/include/public/ring.h
Date: Tue, 23 Feb 2010 14:07:30 +0000	[thread overview]
Message-ID: <4B83EF320200007800030AF5@vpn.id2.novell.com> (raw)

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

             reply	other threads:[~2010-02-23 14:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-23 14:07 Jan Beulich [this message]
2010-02-23 14:30 ` open-coded offsetof() in xen/include/public/ring.h Keir Fraser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B83EF320200007800030AF5@vpn.id2.novell.com \
    --to=jbeulich@novell.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).