ts-7000
[Top] [All Lists]

[ts-7000] Problems with crosstool gcc on packed structures

To:
Subject: [ts-7000] Problems with crosstool gcc on packed structures
From: "manx10004" <>
Date: Tue, 28 Jun 2005 14:39:09 -0000
Folks,

  I have run into a small problem with the suggested gcc compiler.
The sizeof operator does not yield the correct size of a structure
when the structure is packed on byte bounderies. Instead the compiler
seems to give the size up to the next four byte boundery.

  Offsets of variables within the stucture are correct, and I have used
this property to derive the proper size for the structure which I
needed for communications. Still, it is an annoyance, and took some
test code and packet sniffing to diagnose the problem.

  I hope this helps someone else out of a simular situation.
Regards






 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


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

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU