I've read the thread and I agree with the final conclusion from Richard Earnshaw: doing byte by byte is the safest option from GCC's perspective when doing a volatile access as you cannot guarantee that unaligned access do. I think the source code should be changed to explicitely mark the first field as being aligned, or to exclude the volatile field from being packed.
Hi Murat,
I've read the thread and I agree with the final conclusion from Richard Earnshaw: doing byte by byte is the safest option from GCC's perspective when doing a volatile access as you cannot guarantee that unaligned access do. I think the source code should be changed to explicitely mark the first field as being aligned, or to exclude the volatile field from being packed.
Best regards.