Created on 2014-10-20.00:00:00 last changed 94 months ago
[Moved to DR at the October, 2015 meeting.]
Proposed resolution (May, 2015):
Change 9.12.2 [dcl.align] paragraph 2 as follows:
When the alignment-specifier is of the form alignas( constant-expression ):
the constant-expression shall be an integral constant expression;
if the constant expression evaluates to a fundamental alignment, the alignment requirement of the declared entity shall be the specified fundamental alignment
if the constant expression evaluates to an extended alignment and the implementation supports that alignment in the context of the declaration, the alignment of the declared entity shall be that alignmentif the constant expression does not evaluate to an alignment value (6.7.6 [basic.align]), or evaluates to an extended alignment and the implementation does not support that alignment in the context of the declaration, the program is ill-formed.
if the constant expression evaluates to zero, the alignment specifier shall have no effect
otherwise, the program is ill-formed.
Change 9.12.2 [dcl.align] paragraph 4 as follows:
When multiple alignment-specifiers are specified for an entity, theThe alignment requirementshall be set toof an entity is the strictestspecifiednon-zero alignment specified by its alignment-specifiers, if any; otherwise, the alignment-specifiers have no effect.
The description of alignment-specifiers is unclear. For example, 9.12.2 [dcl.align] bullet 2.2 says,
if the constant expression evaluates to a fundamental alignment, the alignment requirement of the declared entity shall be the specified fundamental alignment
However, paragraph 4 says,
When multiple alignment-specifiers are specified for an entity, the alignment requirement shall be set to the strictest specified alignment.
meaning that a less-strict alignment will be ignored, rather than being the alignment of the entity, and presumably meaning that no diagnostic is required for an insufficiently-strict alignment if a more stringent requirement is also supplied.
History | |||
---|---|---|---|
Date | User | Action | Args |
2017-02-06 00:00:00 | admin | set | status: dr -> cd4 |
2015-11-10 00:00:00 | admin | set | messages: + msg6072 |
2015-11-10 00:00:00 | admin | set | status: ready -> dr |
2015-05-25 00:00:00 | admin | set | messages: + msg5454 |
2015-05-25 00:00:00 | admin | set | status: drafting -> ready |
2014-10-20 00:00:00 | admin | create |