This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Decorate C prototypes
- From: Mark Mitchell <mark at codesourcery dot com>
- To: tfogal at sci dot utah dot edu
- Cc: Paolo Carlini <paolo dot carlini at oracle dot com>, Jan Hubicka <hubicka at ucw dot cz>, libstdc++ at gcc dot gnu dot org
- Date: Sun, 03 May 2009 16:20:01 -0700
- Subject: Re: Decorate C prototypes
- References: <20090422160718.GA30574@kam.mff.cuni.cz> <49EF5323.3080203@oracle.com> <49F0CF4A.7050805@codesourcery.com> <49FB2577.4040203@roguewave.com> <49FE2357.1040704@codesourcery.com> <auto-000019301976@sci.utah.edu>
tom fogal wrote:
> At most one function with a particular name can have C language
> linkage. Two declarations for a function with C language linkage
> with the same function name (ignoring the namespace names that
> qualify it) that appear in different namespace scopes refer to the
> same function.
Yes, that settles it.
In that case, I think we need to be very careful about adding exception
specifications to the declarations of these names that appear in library
headers. If we want to add such specifications, we also need to add
logic to the compiler that does not issue errors about conflicting
exception-specifications when declared explicitly by the user or the C
library. (Well, since we apparently fail to issue the error at present,
perhaps we don't actually need to do this -- but I'd rather see us fix
the compiler to issue the error, and then add special handling for
functions in std:: or some such, than rely on the bug that we fail to
issue an error about conflicting exception specifications.)
Thanks,
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713