This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: cleanup handlers and longjmp
- To: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Subject: Re: cleanup handlers and longjmp
- From: Kaz Kylheku <kaz at ashi dot footprints dot net>
- Date: Mon, 11 Dec 2000 19:08:35 -0800 (PST)
- cc: <velco at fadata dot bg>, <libc-alpha at sources dot redhat dot com>
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.