[llvm-bugs] [Bug 24638] New: Taking the address of std::string::c_str causes undefined reference

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Aug 31 07:42:29 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=24638

            Bug ID: 24638
           Summary: Taking the address of std::string::c_str causes
                    undefined reference
           Product: libc++
           Version: 3.6
          Hardware: PC
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: dascandy at gmail.com
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
    Classification: Unclassified

c_str is defined as force-inline, which causes the compiler to not emit it in
any translation unit. It is not included in libc++.dylib either. Taking the
address causes an undefined symbol to be emitted regardless, but the compiler
does not include the implementation.

As far as I can tell the compiler should emit the symbol if it is explicitly
used, even if it is marked as force-inline.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150831/78c13cfc/attachment-0001.html>


More information about the llvm-bugs mailing list