On Dec 18, 2000, Pavel Roskin <[EMAIL PROTECTED]> 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 :-(

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.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

Reply via email to