Aw: Re: asking for __attribute__((aligned()) clarification

2019-08-19 Thread Markus Fröschle
t; Von: "Alexander Monakov" > An: "Richard Earnshaw (lists)" > Cc: "Paul Koning" , "Markus Fröschle" > , gcc@gcc.gnu.org > Betreff: Re: asking for __attribute__((aligned()) clarification > > On Mon, 19 Aug 2019, Richard Earnshaw (lists) wrote: &g

asking for __attribute__((aligned()) clarification

2019-08-19 Thread Markus Fröschle
All, this is my first post on these lists, so please bear with me. My question is about gcc's __attribute__((aligned()). Please consider the following code: #include typedef uint32_t uuint32_t __attribute__((aligned(1))); uint32_t getuuint32(uint8_t p[]) { return *(uuint32_t*)p; }

asking for __attribute__((aligned()) clarification

2019-08-19 Thread Markus Fröschle
All, this is my first post on these lists, so please bear with me. My question is about gcc's __attribute__((aligned()). Please consider the following code: #include typedef uint32_t uuint32_t __attribute__((aligned(1))); uint32_t getuuint32(uint8_t p[]) { return *(uuint32_t*)p; }