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] gcc and plan 8 cc differences ...

To: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] gcc and plan 8 cc differences ...
From: "Ronald G. Minnich" <rminnich@xxxxxxxx>
Date: Thu, 21 Oct 2004 15:01:15 -0600 (MDT)
Delivery-date: Thu, 21 Oct 2004 22:08:37 +0100
Envelope-to: steven.hand@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
I ran into something like this:

typedef struct a {
        unsigned long long x;
        unsigned long y;
        unsigned short z;
        } PACKED thing;

8cc (plan 9 cc) has no "PACKED" capability, so 8cc makes this struct out 
to be 12 bytes. gcc makes it out to be 10. 

I'm wondering if for ease of portability we could consider this; if we're
going to send binary structs around, then make each element in the struct
at least the size of the alignment for that struct on that machine. So,
in this case:


typedef struct a {
        unsigned long long x;
        unsigned long y;
        unsigned long z;
                 ^^^^
        } thing;

no packed keyword. 


Just wondering. I can work around this, but a compatible declaration would  
be nicer.

ron


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] gcc and plan 8 cc differences ..., Ronald G. Minnich <=