This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Your g++ breaks glibc.
- To: Mark Mitchell <mark at codesourcery dot com>
- Subject: Re: Your g++ breaks glibc.
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 15 Jul 1999 04:38:14 -0300
- Cc: law at cygnus dot com, hjl at varesearch dot com, jason at cygnus dot com, egcs-patches at egcs dot cygnus dot com, libc-hacker at sourceware dot cygnus dot com
- Cc: bje at cygnus dot com
- References: <19990714195521.1BA043FC1@varesearch.com> <17627.932018957@upchuck.cygnus.com> <19990714233738F.mitchell@codesourcery.com>
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