cleanup handlers and longjmp

Kaz Kylheku kaz@ashi.footprints.net
Mon Dec 11 19:08:00 GMT 2000


On Tue, 12 Dec 2000, Martin v. Loewis wrote:

> Since using cleanup handlers and setjmp together invokes undefined
> behaviour, a program doing so is not strictly conforming. Therefore,
> extensions may provide a definition for the behaviour where the

However, unless the same behavior is widely implemented by many vendors, it's
useless in portable programming.

That's not to say that it would not be nice to have longjmp, cleanup handlers
and C++ exception handling all play together nicely, for writing programs that
are specific to GNU/Linux.

> standard does not (as is the case with every extension).

No, some extensions are based on syntax errors and diagnosable constraint
violations. E.g. gcc's support for zero length arrays, nested functions,
or labels without a statement.



More information about the Libc-alpha mailing list