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

2019-08-21 Thread Jonathan Wakely
On Wed, 21 Aug 2019 at 17:50, Paul Koning wrote: > > > > > On Aug 21, 2019, at 10:57 AM, Alexander Monakov wrote: > > > > On Wed, 21 Aug 2019, Paul Koning wrote: > > > >> I agree, but if the new approach generates a warning for code that was > >> written > >> to the old rules, that would be

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

2019-08-21 Thread Paul Koning
> On Aug 21, 2019, at 10:57 AM, Alexander Monakov wrote: > > On Wed, 21 Aug 2019, Paul Koning wrote: > >> I agree, but if the new approach generates a warning for code that was >> written >> to the old rules, that would be unfortunate. > > FWIW I don't know which GCC versions accepted

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

2019-08-21 Thread Alexander Monakov
On Wed, 21 Aug 2019, Paul Koning wrote: > I agree, but if the new approach generates a warning for code that was written > to the old rules, that would be unfortunate. FWIW I don't know which GCC versions accepted 'packed' on a scalar type. Already in 2006 GCC 3.4 would issue a warning: $ echo

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

2019-08-21 Thread Paul Koning
> On Aug 21, 2019, at 10:28 AM, Alexander Monakov wrote: > > On Tue, 20 Aug 2019, "Markus Fröschle" wrote: > >> Thank you (and others) for your answers. Now I'm just as smart as before, >> however. >> >> Is it a supported, documented, 'long term' feature we can rely on or not? >> >> If

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

2019-08-21 Thread Alexander Monakov
On Tue, 20 Aug 2019, "Markus Fröschle" wrote: > Thank you (and others) for your answers. Now I'm just as smart as before, > however. > > Is it a supported, documented, 'long term' feature we can rely on or not? > > If yes, I would expect it to be properly documented. If not, never mind. I

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

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

2019-08-19 Thread Paul Koning
> On Aug 19, 2019, at 10:08 AM, Alexander Monakov wrote: > > On Mon, 19 Aug 2019, Richard Earnshaw (lists) wrote: > >> Correct, but note that you can only pack structs and unions, not basic types. >> there is no way of under-aligning a basic type except by wrapping it in a >> struct. > > I

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

2019-08-19 Thread Alexander Monakov
On Mon, 19 Aug 2019, Richard Earnshaw (lists) wrote: > Correct, but note that you can only pack structs and unions, not basic types. > there is no way of under-aligning a basic type except by wrapping it in a > struct. I don't think that's true. In GCC-9 the doc for 'aligned' attribute has been

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

2019-08-19 Thread Richard Earnshaw (lists)
On 19/08/2019 14:57, Paul Koning wrote: On Aug 19, 2019, at 8:46 AM, Markus Fröschle wrote: 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

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

2019-08-19 Thread Paul Koning
> On Aug 19, 2019, at 8:46 AM, Markus Fröschle wrote: > > 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