https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88462
--- Comment #3 from Iain Buclaw <ibuclaw at gdcproject dot org> --- (In reply to r...@cebitec.uni-bielefeld.de from comment #2) > > pragma(msg, pthread_mutex_t.alignof); > > pragma(msg, Mutex.alignof); > > pragma(msg, Mutex.m_hndl.offsetof); > > I get > > 8u > 4u > /homes/ro/mutex_align.d:6:13: error: class core.sync.mutex.Mutex member > m_hndl is not accessible > 16u > > The first is right, but Mutex alignment is off, probably leading to the > 4-byte alignment of m_hndl I'm seeing. Oh wait, Mutex is a class, so of course the alignment is 4. Classes are reference types, so of course alignof would be the pointer.