> That's a pretty old version.  Does this implementation correspond to the 
> current version N3928?  (In particular, the change (made in v5; the 
> version you reference is v4, and the current version is v6) that it's 
> guaranteed that leaving execution of the scope of a defer by a noreturn 
> function call, such as longjmp or exit, or a signal, does not execute the 
> deferred block, when previously it was implementation-defined whether this 
> happens.  Note that the description of Example 3 hasn't been properly 
> updated for that; to be corrected in the ballot draft.)

the behaviour already matched that, so no change is needed afaict

>
> Since we allow mixed-language code to throw exceptions (e.g. C++) across C 
> code built with -fexceptions, it would be a good idea also to have test 
> coverage for how this feature interacts with exceptions.  And I think the 
> GCC manual should document how the feature interacts with relevant GNU 
> extensions (the cleanup attribute - you already have a test using that - 
> and throwing exceptions across C code, at least).

added a test and documentation, we do trigger deferred blocks on -fexception
stack unwind, same as [[gnu::cleanup]] and clang's _Defer implementation

Attachment: 68990292A7A98C5E.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: PGP signature

Reply via email to