followups to your visibility work

Niall Douglas s_fsfeurope2@nedprod.com
Tue Aug 10 02:19:00 GMT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 8 Aug 2004 at 18:24, Mark Mitchell wrote:

> Yes, the ISO standard permits you to redefine operator new.  However,
> it does not permit you to define it as a "hidden" function -- because
> it doesn't talk about such things at all.  The closest analog is that
> it does not allow you to define it as a "static" function.  It's
> sensible, then, to disallow defining it as a hidden function, either. 
> That is what my patch does, assuming it does not have a bug; I do not
> believe you can define "operator new" as a hidden function in the
> current version of the compiler.
> 
> If you can, and the linker crashes, that is both a compiler bug (in my
> patch) and a linker bug (due to the crash).

Ok, that makes me happy then.

Have you tested your patch with code which redefines global operator 
new to be inlined? Again, the standard doesn't say much here but 
certain STL implementations do do it as does my library, as I must 
force anything using my code to use my operator new exclusively (it's 
a secure operator new).

Inlined makes the symbol go linkonce and weak yes? What happens if -
fvisibility-inlines-hidden is set?

Cheers,
Niall





-----BEGIN PGP SIGNATURE-----
Version: idw's PGP-Frontend 4.9.6.1 / 9-2003 + PGP 8.0.2

iQA/AwUBQRfTpsEcvDLFGKbPEQJdAQCcCr6NQ9e+4wy8pY6IOnJKCI6Z8pYAn3DW
jOMNzPm5gnMuhqRgr4q87gBU
=GQxo
-----END PGP SIGNATURE-----



More information about the Gcc-patches mailing list