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: unassignedclangb...@nondot.org
          Reporter: dasca...@gmail.com
                CC: llvm-bugs@lists.llvm.org, mclow.li...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to