Your g++ breaks glibc.

Alexandre Oliva oliva@dcc.unicamp.br
Sat Jul 31 22:30:00 GMT 1999


On Jul 15, 1999, Mark Mitchell <mark@codesourcery.com> 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 [lib.support.start.term] says:

2 The contents [of <cstdlib>] are the same as the Standard C library
  header <stdlib.h>, with the following changes:
[snip]
  exit(int status)
5 The  function  exit()  has  additional  behavior in this International
  Standard:
 [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 http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{dcc.unicamp.br,guarana.{org,com}} aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them



More information about the Gcc-patches mailing list