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

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

Messages

Date: 2025-11-06.23:04:52

Possible resolution:

Change in 9.5.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, ...
Date: 2025-11-06.23:04:52

In 9.5.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.

History
Date User Action Args
2025-11-06 23:04:52adminsetmessages: + msg8342
2025-01-16 00:00:00admincreate