[pooma-dev] Re: [PATCH] Fix FileSetReader/Writer
Jeffrey D. Oldham
oldham at codesourcery.com
Thu Sep 2 17:36:07 UTC 2004
Richard Guenther wrote:
> Jeffrey D. Oldham wrote:
>
>> It is possible to change your patch to use an Offset_t instead of
>> char[8]? This seems a more portable way to align to 64 bits.
>
>
> I don't think it makes a difference. But I don't know possible oddities
> of the C++ standard regarding struct layout - I'm only familiar here
> with C for which it doesn't make a difference. I only know that (for
> C) for two standard conforming compilers there still can be layout
> differences due to allowed padding. And there is no portable way of
> specifying __attribute__((packed)). But I guess that's an academic
> issue.
>
>> Regardless, please commit your patch. I guess these two items will
>> no longer fail in the nightly tests starting 03Sep.
>>
>> Thanks for fixing this.
>
>
> Done,
>
> Richard.
>
http://www.codesourcery.com/cxx-abi/abi.html#layout defines C++ object
layout. It does depend on the machine's alignment, which is what we are
seeing and why my comment that the structure should be laid out the same
on all machines was wrong.
--
Jeffrey D. Oldham
oldham at codesourcery.com
More information about the pooma-dev
mailing list