Title
"array size" is vague
Status
open
Section
9.4.1 [dcl.init.general]
Submitter
Jonathan Wakely

Created on 2025-01-16.00:00:00 last changed 1 month ago

Messages

Date: 2025-01-16.00:00:00

In 9.4.1 [dcl.init.general] bullet 16.5, the specification talks about "array size", but it is unclear whether that is the number of array elements or the size (in bytes) of the array.

Possible resolution:

Change in 9.4.1 [dcl.init.general] bullet 16.5 as follows:

Otherwise, if the destination type is an array, the object is initialized as follows. The initializer shall be of the form ( expression-list ). Let x1 , . . . , xk be the elements of the expression-list. If the destination type is an array of unknown bound, it is defined as having k elements. Let n denote the number of elements of the array size after this potential adjustment. If k is greater than n, the program is ill-formed. Otherwise, ...
History
Date User Action Args
2025-01-16 00:00:00admincreate