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

[Xen-devel] non-ANSI Unions

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] non-ANSI Unions
From: PUCCETTI Armand <armand.puccetti@xxxxxx>
Date: Fri, 23 Mar 2007 16:33:12 +0100
Delivery-date: Fri, 23 Mar 2007 08:31:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.10 (X11/20070306)
Many "unions' are present in the code, but are non-ANSI!

For instance, I see:

struct page_info
{
   /* Each frame can be threaded onto a doubly-linked list. */
   union {
       struct list_head list;
       /* Shadow uses this field as an up-pointer in lower-level shadows */
       paddr_t up;
   };
   /* Reference count and various PGC_xxx flags and fields. */
   u32 count_info;
...}

which should be written properly:

struct page_info
{
   /* Each frame can be threaded onto a doubly-linked list. */
   union {
       struct list_head list;
       /* Shadow uses this field as an up-pointer in lower-level shadows */
       paddr_t up;
   } foo;

   /* Reference count and various PGC_xxx flags and fields. */
   u32 count_info;
...}

Is there any good reason to do so? Is it possible to change that, to comply with the standard
(and therefore with analysis tools too) ?

Armand


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

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