Title
Size limit for automatic array object
Status
nad
Section
Clause [Annex] B [implimits]
Submitter
Jason Merrill

Created on 2013-05-03.00:00:00 last changed 131 months ago

Messages

Date: 2014-02-15.00:00:00

Notes from the February, 2014 meeting:

CWG discussed adding such a limit, even without the changes for arrays of runtime bound, but decided that it was unneeded; such handling could be added by implementations if desirable.

Date: 2014-02-15.00:00:00

Rationale (February, 2014):

The specification was removed from the WP and moved into a Technical Specification.

Date: 2013-09-15.00:00:00

Proposed resolution (September, 2013):

This issue is resolved by the resolution of issue 1761.

Date: 2022-09-25.18:08:42

9.3.4.5 [dcl.array] paragraph 1 says,

The expression is erroneous if:

  • ...

  • its value is such that the size of the allocated object would exceed the implementation-defined limit (Annex Clause Annex B [implimits]);

  • ...

The only relevant limit in Clause Annex B [implimits] is that of the size of an object, but presumably an implementation might want to impose a smaller limit on a stack-based object. This separate quantity is referred to in paragraph 4 when describing an array of unspecified bound:

If the size of the array exceeds the size of the memory available for objects with automatic storage duration, the behavior is undefined.

but perhaps it needs to be mentioned in Clause Annex B [implimits] as well.

History
Date User Action Args
2014-03-03 00:00:00adminsetmessages: + msg4987
2014-03-03 00:00:00adminsetmessages: + msg4986
2014-03-03 00:00:00adminsetstatus: ready -> nad
2013-10-14 00:00:00adminsetmessages: + msg4606
2013-10-14 00:00:00adminsetstatus: open -> ready
2013-05-03 00:00:00admincreate