This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 117b. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-08-11
1305. alignof applied to array of unknown sizeSection: 7.6.2.6 [expr.alignof] Status: CD3 Submitter: Nikolay Ivchenkov Date: 2011-04-26[Voted into the WP at the February, 2012 meeting; moved to DR at the October, 2012 meeting.]
According to 7.6.2.6 [expr.alignof] paragraph 1,
An alignof expression yields the alignment requirement of its operand type. The operand shall be a type-id representing a complete object type or an array thereof or a reference to a complete object type.
This (presumably unintentionally) excludes a reference to an array with an unknown bound but a complete element type; the bound is not needed to determine the alignment of the array.
Proposed resolution (August, 2011):
Change 7.6.2.6 [expr.alignof] paragraph 1 as follows:
An alignof expression yields the alignment requirement of its operand type. The operand shall be a type-id representing a complete object type or an array thereof or a reference to a complete object type one of those types.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4