Problem with noexcept and incomplete backtrace

Jonathan Wakely jwakely.gcc@gmail.com
Wed Jan 9 10:44:00 GMT 2013


On 9 January 2013 09:13, Tobias Ringström wrote:
> On 01/08/2013 10:53 PM, Jonathan Wakely wrote:
>>
>> On 8 January 2013 21:48, Jonathan Wakely wrote:
>>>
>>> Tobias, please report it to bugzilla. The standard places no
>>> requirements on what happens except that std::terminate is called but
>>> even if it's not a bug there is room for improvement.
>>
>>
>> I was a bit hasty, the standard does place some requirements:
>>
>> In the situation where the search for a handler (15.3) encounters the
>> outermost block of a function with a
>> noexcept-specification that does not allow the exception (15.4), it is
>> implementation-defined whether the
>> stack is unwound, unwound partially, or not unwound at all before
>> std::terminate() is called. In all other
>
>
> That only tells us that GCC's noexcept handling is standard compliant. It
> does not say that it's the least useful.  :)

To be compliant it must document its implementation-defined behaviour..

>> G++ appears to partially unwind the stack, although that isn't
>> documented at http://gcc.gnu.org/onlinedocs/gcc/Exception-handling.html
>
>
> That text is probably older than noexcept, and GCC actually does follow
> what's writted there when noexcept isn't used.

Yes, but the relevant paragraph from the standard says that case and
the noexcept case are distinct, and both (separately) implementation
defined, G++ only defines one of them.



More information about the Gcc-help mailing list