This is the mail archive of the
mailing list for the GCC project.
Re: Anonymous Namespaces
Gabriel Dos Reis <firstname.lastname@example.org> writes:
> Kevin Atkinson <email@example.com> writes:
> | Is there a reason gcc 3.4 does not treat functions inside an anonymous
> | namespace as having static linkage.
> Because the C++ standard says those thingies have external linkage.
This doesn't preclude our doing optimizations on the information that
thingies inside an anonymous namespace can only be accessed from the
current translation unit. Further, if a conforming program can't tell
the difference, I don't see why we couldn't tag those symbols local in
the object file. This would, at least, avoid the need for the