[LLVMdev] Language lawyer question
dberlin at dberlin.org
Wed Mar 12 13:05:27 PDT 2008
On Wed, Mar 12, 2008 at 3:49 PM, Mike Stump <mrs at apple.com> wrote:
> On Mar 11, 2008, at 8:42 PM, Dale Johannesen wrote:
> > Looking through the gcc testsuite turned up an interesting edge
> > case. Let's assume our target leaves a hole for alignment in struct
> > x, as do x86 and powerpc. Do you think the following code can
> > validly abort?
> No. The value of the object referred to be the left hand side must be
> replaced by the object on the right. The objects are defined to be a
> sequence of sizeof(x) bytes (I'm assuming the testcase does struct x
> X, Y;). If a byte isn't so updated, trivially, the object has not
> been replaced.
Except that the standard specifically says the value of the padding
bytes are undefined, and that you can do structure copies by member.
More information about the llvm-dev