[LLVMbugs] [Bug 8205] Template function gets wrong visibility, ends up in __textcoal_nt section instead of __text section

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Sep 22 09:04:06 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=8205

Douglas Gregor <dgregor at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #1 from Douglas Gregor <dgregor at apple.com> 2010-09-22 11:04:05 CDT ---
Clang is behaving correctly here. With GCC's behavior (using the __text)
section, a program that contains two explicit instantiations of
std::basic_string<char16> will fail to link, because their (identical) non-weak
symbols will collide. Clang correctly marks explicit instantiations as weak
symbols so that the linker will coalesce those symbols 

The C++ standard notes (indirectly) that there can be multiple explicit
instantiations of the same entity in C++03 [temp.explicit]p4, and the Core
Working Group reaffirmed its desire to permit multiple explicit instantiations
of the same entity at its most recent meeting.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list