Title
Extended alignment and object representation
Status
open
Section
6.11 [basic.align]
Submitter
Mike Miller

Created on 2017-09-05.00:00:00, last changed 2018-04-11.00:00:00.

Messages

Date: 2018-04-15.00:00:00

Notes from the April, 2018 teleconference:

It appears that the same question exists for class types that are directly given extended alignment, as opposed to receiving it from a subobject.

Date: 2017-09-05.00:00:00

There is implementation variance in the treatment of an example like:

  enum struct alignas(64) A {};
  A a[10]; 

The Standard does not appear to indicate whether padding bits are added to the object representation for an enumeration or not, affecting the result of sizeof and the alignment of the array elements.

If the extended alignment does not affect the object representation of the type, it would be useful to specify that the array declaration is ill-formed because it requires violating the alignment requirement (and similarly for an array new-expression where the bound is known at compile time).

History
Date User Action Args
2018-04-11 00:00:00adminsetmessages: + msg6203
2017-09-05 00:00:00admincreate