Your g++ breaks glibc.

Alexandre Oliva
Sat Jul 31 22:30:00 GMT 1999

On Jul 15, 1999, Mark Mitchell <> wrote:

> The code is indeed buggy:

>   [except.spec]

>   If any declaration of a function has an exception-specification, all
>   declarations, including the definition and an explicit specialization,
>   of  that  function shall have an exception-specification with the same
>   set of type-ids.

> It couldn't be any clearer.

Yup, but [] says:

2 The contents [of <cstdlib>] are the same as the Standard C library
  header <stdlib.h>, with the following changes:
  exit(int status)
5 The  function  exit()  has  additional  behavior in this International
 [no mention of throws()]

Moreover, [basic.start.main] says:

4 Calling the function
  void exit(int);
  declared  in  <cstdlib> [...]

which, to me, implies that exit(int) must not be declared with
throws(), so it is glibc that's buggy, and autoconf shouldn't have to
be changed, because it does use only Standard C++.  Well, at least
until we find out that some other vendor decided to add a throws
clause to the declaration of functions for which the C++ Standard
demands no throws clauses.

Alexandre Oliva IC-Unicamp, Bra[sz]il
oliva@{,guarana.{org,com}} aoliva@{,}
** I may forward mail about projects to mailing lists; please use them

More information about the Gcc-patches mailing list