home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!cs.utexas.edu!sdd.hp.com!swrinde!emory!sol.ctr.columbia.edu!ira.uka.de!slsvaat!josef!kanze
- From: kanze@us-es.sel.de (James Kanze)
- Subject: Re: setjmp/longjmp question
- In-Reply-To: erics@cadkey.cadkey.com's message of Fri, 8 Jan 1993 19:56:13 GMT
- Message-ID: <KANZE.93Jan25184636@slsvdnt.us-es.sel.de>
- Sender: news@us-es.sel.de
- Organization: SEL
- References: <1993Jan8.195613.14303@cadkey.com>
- Date: 25 Jan 93 18:46:36
- Lines: 32
-
- In article <1993Jan8.195613.14303@cadkey.com> erics@cadkey.cadkey.com
- (Eric Smith) writes:
-
- |> In <setjmp.h>, Microsoft C has a #ifndef to comment out the entire
- |> contents of the file if compiling a C++ program. Other compilers I
- |> use (Borland, ObjectCenter, and one other cfront implementation) allow
- |> setjmp/longjmp even from a C++ program.
-
- |> I realize the problems with stack unwinding and object destruction,
- |> but why doesn't Microsoft let me use these? It is kind of a problem
- |> when I am porting a straight C program to C++ just to get some
- |> additional type checking.
-
- |> I could find no mention of this in the ARM.
-
- |> Does anyone know of any other C++ compiler that doesn't allow setjmp?
-
- No.
-
- The C++ standards committee have said that they are adopting the C
- library more or less integrally, so I would suppose that this means
- setjmp/longjmp too.
-
- Further, I have actually used setjmp/longjmp in full C++ programs
- (with polymorphic classes, etc.). Obviously, its uses are limited,
- and you'd better know what you're doing, but it can be done, and in
- the absence of exceptions...
- --
- James Kanze email: kanze@us-es.sel.de
- GABI Software, Sarl., 8 rue du Faisan, F-67000 Strasbourg, France
- Conseils en informatique industrielle --
- -- Beratung in industrieller Datenverarbeitung
-