- Title
- Unclear requirements for multiple alignas specifiers
- Status
- cd4
- Section
- 9.13.2 [dcl.align]
- Submitter
- Steve Clamage
Created on 2014-10-20.00:00:00 last changed 116 months ago
Messages
Date: 2015-10-15.00:00:00
[Moved to DR at the October, 2015 meeting.]
Date: 2015-05-15.00:00:00
Proposed resolution (May, 2015): Change 9.13.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 does not evaluate to
an alignment value (6.8.3 [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.
Change 9.13.2 [dcl.align] paragraph 4 as follows:
if the constant expression evaluates to a fundamental
alignment, the alignment requirement of the declared entity
shall be the specified fundamental alignmentif 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 evaluates to zero, the alignment
specifier shall have no effectotherwise, the program is ill-formed.
When multiple alignment-specifiers are specified
for an entity, the The alignment
requirement shall be set to of an entity
is the strictest specified non-zero alignment
specified by its alignment-specifiers, if any; otherwise,
the alignment-specifiers have no effect.
Date: 2026-07-27.15:54:01
The description of alignment-specifiers is unclear. For
example, 9.13.2 [dcl.align] bullet 2.2 says, However, paragraph 4 says, 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.
if the constant expression evaluates to a fundamental alignment, the
alignment requirement of the declared entity shall be the specified
fundamental alignment
When multiple alignment-specifiers are specified for an entity, the
alignment requirement shall be set to the strictest specified alignment.
| 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 | |