[cxx-abi-dev] N3639 (arrays of runtime bound): __cxa_bad_array_length

Richard Smith richardsmith at google.com
Sat Apr 20 23:19:12 UTC 2013


Hi,

N3639, which was voted into the C++14 committee draft today, adds a
std::bad_array_length exception which an implementation is required to
throw if the computed bound for a VLA ("array of runtime bound") is
"erroneous".

"erroneous" can be any of:
 - bound <= 0
 - bound > some implementation-defined limit
 - bound < number of initializers provided

We need a new ABI entry point to throw this exception. I propose we don't
try to encode what went wrong and just use

  extern "C" void __cxa_throw_bad_array_length();

analogously to __cxa_throw_bad_array_*new*_length.

Sound good?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/cxx-abi-dev/attachments/20130420/004479bb/attachment.html>


More information about the cxx-abi-dev mailing list