Thierry, is your comment re the first struct member address aligning to the
struct address still true in a world in which many C compilers randomize
struct layout? I'm guessing not.


On Wed, Sep 2, 2026 at 7:30 AM <[email protected]> wrote:

> On Wed, Sep 02, 2026 at 10:13:51AM +0200, Shawn Rutledge wrote:
> >
> > Lack of shared data structure implementations is one of the main
> downsides to C.  What?s your favorite workaround?
> 
> But since it is a guaranteed that the first member of a structure is
> at the same address as the structure, one can cast to a shared
> structure given as the first member of extended or overloaded
> structures.
> --
> Thierry Laronde <tlaronde +AT+ kergis +dot+ com>
>              http://www.kergis.com/
>             http://kertex.kergis.com/
> Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C

------------------------------------------
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Td859d3c6cefc922f-M926bbc407c719f7457cb68ac
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Reply via email to