Using __attribute((packed))__ on picky architectures
Darren Rook
route66@gmail.com
Fri Jan 16 16:43:00 GMT 2009
On Fri, Jan 16, 2009 at 10:33 AM, Ian Lance Taylor <iant@google.com> wrote:
>> Is there some method to tell the compiler that *val may not be word
>> aligned, so the compiler can generate code to work around the
>> alignment issue (instead of assuming the *val will be word aligned)?
>
> No. Avoid writing this sort of code.
I thought as much.
Then why is attribute((packed)) provided? I really don't see a use
for it. Why not rename it to __attribute__((addressviolation))?
Thanks.
More information about the Gcc-help
mailing list