[LLVMbugs] [Bug 22951] New: -std=c++14 causes link failure due to missing operator delete(void*, unsigned long)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Mar 18 12:48:51 PDT 2015


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

            Bug ID: 22951
           Summary: -std=c++14 causes link failure due to missing operator
                    delete(void*, unsigned long)
           Product: libc++
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jeremyhu at apple.com
                CC: llvmbugs at cs.uiuc.edu, mclow.lists at gmail.com
    Classification: Unclassified

As reported to me via MacPorts trac, recent trunk fails to include a static
implementation of operator delete(void*, unsigned long) and thus fails to link
when using --std=c++14

$ cat foo.cc
int main()
{
  auto f = new int;
  delete f;
}
$ clang++-mp-3.6 -std=c++14 foo.cc
$ clang++-mp-3.7 -std=c++14 foo.cc
Undefined symbols for architecture x86_64:
  "operator delete(void*, unsigned long)", referenced from:
      _main in foo-7bc325.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

-- 
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/20150318/e6517d5b/attachment.html>


More information about the llvm-bugs mailing list