Gentoo Archives: gentoo-dev

From: Ciaran McCreesh <ciaran.mccreesh@×××××××××××××.uk>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] strict-aliasing rules, don't break them
Date: Sat, 17 Jun 2006 13:35:08
Message-Id: 20060617142828.4479df30@snowdrop.home
In Reply to: Re: [gentoo-dev] strict-aliasing rules, don't break them by "Harald van Dijk"
1 On Sat, 17 Jun 2006 15:20:52 +0200 Harald van Dijk <truedfx@g.o>
2 wrote:
3 | and then accessing {first, null}, or {null, last} as a struct dl_node
4 | the way to fix the code would be to rewrite the code to use arrays
5 | of pointers instead of simply three pointer members. There is no
6 | valid way to do what the code does using pointer members (that's
7 | simple logic: it relies on the padding between first and null to be
8 | exactly the same as that between null and last, which is a guarantee
9 | standard C doesn't make), so fixing it requires quite a bit of work.
10
11 It can be done using nested structs.
12
13 --
14 Ciaran McCreesh
15 Mail : ciaran dot mccreesh at blueyonder.co.uk
16
17
18 --
19 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] strict-aliasing rules, don't break them "Harald van Dijk" <truedfx@g.o>