This is the mail archive of the
mailing list for the GCC project.
Re: Static linkage and anonymous namespace
>>>>> "Martin" == Martin von Loewis <firstname.lastname@example.org> writes:
Martin> It is currently easy to produce duplicate symbols if you
Martin> know the algorithm for the anonymous namespace name. Is
Martin> this a problem? If so, should we merge the current time
Martin> into the name?
Yes. And any other random bits that you can come up with.
(Seriously, picking 1024 random bits and tacking them on to the name
is not the worst idea imaginable here; it should reduce the chance of
collision to a negligible probability.)
Mark Mitchell email@example.com
Mark Mitchell Consulting http://www.markmitchell.com