From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <805e42c0155b88900921831b032c748e@terzarima.net> From: Charles Forsyth Date: Wed, 15 Sep 2010 09:37:50 +0100 To: 9fans@9fans.net In-Reply-To: <2947a8c22b8274d84c68f633ae888de7@plan9.bell-labs.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] c compiler bug Topicbox-Message-UUID: 5758f198-ead6-11e9-9d60-3106f5b1d025 actually, it gets worse. i looked up the stuff for ARM, and it was much as i expected, but they also pointed out another problem, obvious in retrospect. you say you want structure assignments to work, or at least not fail. fair enough, but what about this: S s; int *p = &s.c; *p = 1; int x = *p; the point is that in general given an int*, there's no way to know that the target is misaligned. ARM thoughtfully provides a __packed attribute, as in __packed int *p; and then an appropriate sequence of byte-by-byte loads (or stores) will be used to access it, but a normal int* will produce an alignment trap.