Decorate C prototypes

Mark Mitchell mark@codesourcery.com
Sun May 3 23:20:00 GMT 2009


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



More information about the Libstdc++ mailing list