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

Dennis Handly dhandly at cup.hp.com
Mon Apr 22 23:26:54 UTC 2013


>From: Richard Smith <richardsmith at google.com>
>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".
> - bound <= 0
> - bound > some implementation-defined limit
> - bound < number of initializers provided

>I propose we don't try to encode what went wrong and just use
>  extern "C" void __cxa_throw_bad_array_length();

Any reason we don't try to pass in one of the above three?
Do we want to enable a useful what() string?

>From: Florian Weimer <fweimer at redhat.com>
>Do we want to throw an exception if the stack hasn't got sufficient 
>space for the array?

Or is this just some "small" implementation-defined limit that is mentioned
in N3639?

I assume this limit is really based on total size and not on a bound?


More information about the cxx-abi-dev mailing list