
Dear Reinhard Meyer,
In message 4C7B7864.2080607@emk-elektronik.de you wrote:
One could add a comment above like: /* * it is mandatory that linebuf stays uint32_t aligned * since we are going to slide along it with a uint32_t * pointer */ uint32_t linebuf[MAX_LINE_LENGTH_BYTES/4 + 1];
...and using the attribute avoids the ugly code and all the 5 lines of comment because it's self-explanatory.
I personally prefer this above an attribute. Its disputeable but I prefer to do things with "normal C constructs" where possible. You can already see from the discussion that __aligned as a toolchain-abstracted variant (defined in a toolchain header file) or attribute((__aligned__)) as a very toolchain dependant variant shall be used ;)
Anyway, both patches have been offered, any will work for me as long as I can see ASCII properly on ARM machines...
Please let's use the attribute version.
Best regards,
Wolfgang Denk