[expr.new]p7 states (in part): ... If the expression, after converting to std::size_t, is a core constant expression and the expression is erroneous, the program is ill-formed. Otherwise, a new-expression with an erroneous expression does not call an allocation function and terminates by throwing an exception of a type that would match a handler (15.3) of type std::bad_array_new_length (18.6.2.2). ...
This patch implements support for throwing that exception, at least with the Itanium ABI. It calls out that the Microsoft ABI does not currently implement this functionality, but there's a test in place which we can fix when we get around to better MS support for this. ~Aaron
oper_new.patch
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
