[Bug c++/18077] [3.3/3.4/4.0 Regression] Members of anonymous namespaces get name mangled with first global variable instead of file name

bugzilla at familie-koegl dot de gcc-bugzilla@gcc.gnu.org
Tue Nov 2 07:22:00 GMT 2004


------- Additional Comments From bugzilla at familie-koegl dot de  2004-11-02 07:22 -------
(In reply to comment #2)
> Using -z muldefs is beyond the scope of the C++ standard.
> There is no way to win for everyone here; some people really do not want the
> random names because they want predictability from the compiler.

Yeah, and that's exactly why I would have expected the <= 3.0.4 behavior: the 
randomness in names results from later GCC's incorporating the name of the 
first global symbol in the symbol names of the unnamed namespace entities. I 
really don't see how the new behavior is less random or more predictable. 
Especially when one can switch back to the old behavior by including a file 
containing nothing but 'namespace {}' via -include. So what was the rationale 
for having changed the behavior at all?

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18077



More information about the Gcc-bugs mailing list