This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 119a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-12-20
[Moved to DR at the October, 2012 meeting.]
There are a number of places in the Standard that appear toassume that exceptions are only thrown bythrow-expressions.Various other constructs, such asdynamic_casts,typeid,new-expressions, etc., can also throwexceptions, so a more general term should be coined and appliedin place ofthrow-expression wherever necessary.
Proposed resolution (February, 2012):
Change 6.8.6.5.2 [basic.stc.dynamic.allocation] paragraph 3 as follows:
...Any other allocation function that fails to allocate storage shallindicate failure only by throwing an exception(14.2 [except.throw]) of a type that would match a handler (14.4 [except.handle]) of typestd::bad_alloc (17.6.4.1 [bad.alloc]).
Change 6.8.6.5.2 [basic.stc.dynamic.allocation] paragraph 4 as follows:
...[Note: In particular, a global allocation function is notcalled to allocate storage for objects with static storage duration(6.8.6.2 [basic.stc.static]), for objects or references with threadstorage duration (6.8.6.3 [basic.stc.thread]), for objects of typestd::type_info (7.6.1.8 [expr.typeid]), or forthecopy of an object thrown by a throw expressionan exceptionobject (14.2 [except.throw]). —end note]
Change 7.6.1.7 [expr.dynamic.cast] paragraph 9 as follows:
The value of a failed cast to pointer type is the null pointer valueof the required result type. A failed cast to reference type throwsan exception (14.2 [except.throw]) of a type that wouldmatch a handler (14.4 [except.handle]) of typestd::bad_cast (17.7.4 [bad.cast]).
Change 7.6.1.8 [expr.typeid] paragraph 2 as follows:
...If the glvalue expression is obtained by applying the unary* operator to a pointer68 and the pointer is anull pointer value (7.3.12 [conv.ptr]), thetypeidexpression throwsthean exception (14.2 [except.throw]) of a type that would match a handler of typestd::bad_typeid exception (17.7.5 [bad.typeid]).
Change 7.6.2.8 [expr.new] paragraph 7 as follows:
When the value of theexpression in anoptr-new-declarator is zero, the allocation function is calledto allocate an array with no elements. If the value of thatexpression is less than zero or such that the size of the allocatedobject would exceed the implementation-defined limit, or if thenew-initializer is abraced-init-list for which the number ofinitializer-clauses exceeds the number of elements toinitialize, no storage is obtained and thenew-expressionterminates by throwingthrows an exception(14.2 [except.throw]) of a type that would match ahandler (14.4 [except.handle]) of typestd::bad_array_new_length (17.6.4.2 [new.badlength]).
Change Clause 14 [except] paragraph 1 as follows:
...A handler will be invoked only byathrow-expressioninvokedthrowing an exception in code executed in thehandler's try block or in functions called from the handler's tryblock...
Change Clause 14 [except] paragraph 2 as follows:
Atry-block is astatement (Clause 8 [stmt]). Athrow-expression is of typevoid.Code that executes athrow-expression is said to“throw an exception;” code that subsequently gets controlis called a “handler.”[Note:...
Change 14.2 [except.throw] paragraph 1 as follows:
Throwing an exception transfers control to a handler.[Note:An exception can be thrown from one of the following contexts:throw-expression (see below), allocation functions(6.8.6.5.2 [basic.stc.dynamic.allocation]),dynamic_cast(7.6.1.7 [expr.dynamic.cast]),typeid (7.6.1.8 [expr.typeid]),new-expression (7.6.2.8 [expr.new]), and standardlibrary functions (16.3.2.4 [structure.specifications]). —endnote] An object is passed and the type of that objectdetermines which handlers can catch it. [Example:...
Change 14.2 [except.throw] paragraph 3 as follows:
Athrow-expressionThrowing an exceptioncopy-initializes (9.5 [dcl.init], 11.4.5.3 [class.copy.ctor]) a temporary object, called theexceptionobject, the type of which is determined by removing any top-levelcv-qualifiers from the static type of the operand ofthrow and adjusting the type from “array ofT” or “function returningT” to“pointer toT” or “pointer to functionreturningT”, respectively. The temporary is anlvalue and is used to initialize the variable named in the matchinghandler (14.4 [except.handle]). If the type of theexception object would be an incomplete type or a pointer to anincomplete type other than (possibly cv-qualified)void theprogram is ill-formed.Except for these restrictions and therestrictions on type matching mentioned in 14.4 [except.handle],the operand ofthrow is treated exactly as a functionargument in a call (7.6.1.3 [expr.call]) or the operand of areturn statement.Evaluating athrow-expression withan operand throws an exception; the type of the exception object isdetermined by removing any top-levelcv-qualifiers from thestatic type of the operand and adjusting the type from “array ofT” or “function returningT” to“pointer toT” or “pointer to functionreturningT,” respectively.
Change 14.2 [except.throw] paragraph 4 as follows:
...[Note:ana thrown exceptionthrown by athrow-expressiondoes not propagate toother threads unless caught, stored, and rethrown using appropriatelibrary functions; see 17.9.7 [propagation] and 32.10 [futures]. —end note]
Change 14.2 [except.throw] paragraph 8 as follows:
Athrow-expression with no operand rethrows the currentlyhandled exception (14.4 [except.handle]). The exception isreactivated with the existingtemporaryexceptionobject; no newtemporaryexception object is created.The exception is no longer considered to be caught; therefore, thevalue ofstd::uncaught_exception() will again betrue. [Example:...
Change 14.3 [except.ctor] paragraph 1 as follows:
As control passes fromathrow-expressionthepoint where an exception is thrown to a handler, destructors areinvoked for all automatic objects constructed since the try block wasentered...
Change 14.3 [except.ctor] paragraph 3 as follows:
The process of calling destructors for automatic objects constructedon the path from a try block toathrow-expressionthe point where an exception is thrown is called“stack unwinding.” If a destructor...
Change 14.4 [except.handle] paragraph 17 as follows:
When the handler declaresa non-constantanobject, any changes to that object will not affect thetemporaryobject that was initialized by execution of thethrow-expressionexception object. When thehandler declares a reference toa non-constantan object, any changes to the referenced object are changesto thetemporary object initialized when thethrow-expression was executedexception objectand will have effect should that object be rethrown.
Change 17.9.5.4 [terminate] paragraph 1 as follows:
Remarks: Called by the implementation when exception handlingmust be abandoned for any of several reasons (14.6.2 [except.terminate]), in effect immediately afterevaluating thethrow-expression (17.9.5.1 [terminate.handler])throwing the exception. May also be called directly by theprogram.