On Fri, 26 Feb 2021, Thiago Macieira via Gcc-patches wrote: > On Friday, 26 February 2021 11:31:00 PST Andreas Schwab wrote: > > On Feb 26 2021, Thiago Macieira wrote: > > > On Friday, 26 February 2021 10:14:42 PST Andreas Schwab wrote: > > >> On Feb 26 2021, Thiago Macieira via Gcc-patches wrote: > > >> > - alignas(__alignof__(ptrdiff_t)) ptrdiff_t _M_a; > > >> > + alignas(__alignof__(int)) int _M_a; > > >> > > >> Futexes must be aligned to 4 bytes. > > > > > > Agreed, but doesn't this accomplish that? > > > > No. It uses whatever alignment the type already has, and is an > > elaborate no-op. > > I thought so too when I read the original line. But I expected it was written > like that for a reason, especially since the same pattern appears in other > places. > > I can change to "alignas(4)" (which is a GCC extension, I believe). Is that > the correct solution? IMNSHO make use of the corresponding atomic type. Then there'd be no need for separate what's-the-right-align-curse games. brgds, H-P
- Re: [PATCH 4/5... Ville Voutilainen via Gcc-patches
- Re: [PATCH 4/5... Thiago Macieira via Gcc-patches
- Re: [PATCH 4/5... Ville Voutilainen via Gcc-patches
- Re: [PATCH 4/5... Thiago Macieira via Gcc-patches
- [PATCH 5/5] barrier: optimise by not hav... Thiago Macieira via Gcc-patches
- Re: [PATCH 5/5] barrier: optimise b... Jonathan Wakely via Gcc-patches
- Re: [PATCH 1/5] std::latch: reduce inter... Andreas Schwab
- Re: [PATCH 1/5] std::latch: reduce ... Thiago Macieira via Gcc-patches
- Re: [PATCH 1/5] std::latch: red... Andreas Schwab
- Re: [PATCH 1/5] std::latch:... Thiago Macieira via Gcc-patches
- Re: [PATCH 1/5] std::la... Hans-Peter Nilsson
- Re: [PATCH 1/5] st... Richard Biener via Gcc-patches
- Re: [PATCH 1/5... Jonathan Wakely via Gcc-patches
- Re: [PATCH 1/5... Andreas Schwab
- Re: [PATCH 1/5... Jonathan Wakely via Gcc-patches
- Re: [PATCH 1/5... Hans-Peter Nilsson
- Re: [PATCH 1/5] st... Thomas Rodgers
- Re: [PATCH 1/5] std::latch: reduce inter... Jonathan Wakely via Gcc-patches
- Re: [PATCH 1/5] std::latch: reduce ... Thiago Macieira via Gcc-patches
- Re: [PATCH 1/5] std::latch: red... Jonathan Wakely via Gcc-patches