Email List: Xaustin-group-lX
[All Lists]

Re: XSH/XRAT conflict over cancellation points

To: yyyyyyyyyy@xxxxxxxxxx (Seeds, Glen)
Subject: Re: XSH/XRAT conflict over cancellation points
From: "Wojtek Lerch" <yyyyyy@xxxxxxx>
Date: Fri, 21 May 2004 14:03:40 -0400 (EDT)
Cc: yyyyyyyyyyyyyy@xxxxxxxxxxxxx
Seeds, Glen wrote:
> These may not be related issues. C++ exceptions do not require the
> explicit use of "volatile", while setjmp()/longjmp() do. As a result, it

But C does not require it *not* to work.  It just *allows* a compiler to
discard modifications to non-volatile locals.  If you're *implementing*
a compiler, you're free *not* to discard them.

> is almost impossible to implement C++ exceptions using

Ony if you're trying to implement a translator that generates portable C
from C++, and you can't make assumptions about the C compiler beyond
what the C standard promises you.  If you're writing a complete C++
compiler, you're free to implement setjmp() in a way that will allow you
to use it for exception handling.

> setjmp()/longjmp(). This was an unfortunate choice on the part of the
> standards authors, but we have to live with it.

Application writers do.  Compiler writers can ignore it.


<Prev in Thread] Current Thread [Next in Thread>