This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] Java: Add heap dump and analyze support.


Chris Lattner wrote:

On Jan 23, 2007, at 3:42 PM, Tom Tromey wrote:


"Joel" == Joel Dice <dicej@mailsnare.net> writes:

Joel> This is actually something I've been curious about with respect Joel> to libgcj. My understanding is that internal linkage is Joel> deprecated in C++, with anonymous namespaces as the prefered Joel> mechanism. So I'm a bit suprised when I see new code that uses Joel> the former. Is this just a matter of being consistent with old Joel> code, or is there a technical reason?

libgcj is just old school.
So am I. Why I remember when....

But seriously, I will change it to use the anonymous namespace as suggested.


G++ prior to 4.2 actually didn't mark symbols in anonymous namespaces as "internal", but it certainly does when symbols are marked 'static'. This could cause significant performance and size issues, depending on your code base. In LLVM, we've resorted to marking classes in anonymous namespaces as attribute(hidden) to work around this (because you can't mark a class 'static').


Thanks for this pointer. It will undoubtedly be of use.

Thanks for the pointers,
David Daney


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]