[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Problem with exit() and new version of gcc.
From: |
Bernard Dautrevaux |
Subject: |
RE: Problem with exit() and new version of gcc. |
Date: |
Mon, 18 Dec 2000 10:06:47 +0100 |
> -----Original Message-----
> From: Alexandre Oliva [mailto:address@hidden
> Sent: Monday, December 18, 2000 8:47 AM
> To: Pavel Roskin
> Cc: Assar Westerlund; Mo DeJong; address@hidden
> Subject: Re: Problem with exit() and new version of gcc.
>
>
> On Dec 18, 2000, Pavel Roskin <address@hidden> wrote:
>
> > No declaration stdlib.h Simple Using throw
> > egcs-1.1.2 Ok Ok Ok Ok
> > gcc-2.95.2 Ok Ok Ok Ok
> > gcc-2.97 Ok Ok Not Ok Ok
>
> > Can anybody continue? How about commercial compilers?
>
> Unfortunately, it's not just a matter of the compiler in use. IIRC,
> stdlib.h isn't supplied by GCC, it's part of the C library, so we'd
> have to test each different OS :-(
>
> > Otherwise we should check what declaration if preferred for
> the given
> > compiler and use it.
>
> It seems to me that the only safe way to go is to test first :-(
Yep; and anyway this test is even needed to write portable C++ code, so
Autoconf should provide it, as it obviously *needs* it :-)
>
> Fortunately, we don't have to worry about std::exit(int), since
> stdlib.h, unlike cstdlib, must bring std::exit(int) into the global
> namespace.
Regards,
Bernard
--------------------------------------------
Bernard Dautrevaux
Microprocess Ingenierie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel: +33 (0) 1 47 68 80 80
Fax: +33 (0) 1 47 88 97 85
e-mail: address@hidden
address@hidden
--------------------------------------------
- RE: Problem with exit() and new version of gcc.,
Bernard Dautrevaux <=