This is the mail archive of the
mailing list for the GCC project.
Re: Anonymous Namespaces
"Zack Weinberg" <firstname.lastname@example.org> writes:
| Gabriel Dos Reis <email@example.com> writes:
| > Kevin Atkinson <firstname.lastname@example.org> 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.
There is no dispute there!
| 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.
Just lay down the conditions under which a conforming program can tell
the difference (and implement :-).
| This would, at least, avoid the need for the random-bytes mess.
I don't know.