This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Anonymous Namespaces
"Zack Weinberg" <zack@codesourcery.com> writes:
| Gabriel Dos Reis <gdr@integrable-solutions.net> writes:
|
| > Kevin Atkinson <kevina@gnu.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.
-- Gaby