[MacPorts] #47191: clang-3.7: c++14: missing support for binary operator delete

MacPorts noreply at macports.org
Wed Mar 18 04:19:24 PDT 2015


#47191: clang-3.7: c++14: missing support for binary operator delete
-----------------------------+--------------------------------
 Reporter:  akim.demaille@…  |      Owner:  macports-tickets@…
     Type:  defect           |     Status:  new
 Priority:  Normal           |  Milestone:
Component:  ports            |    Version:  2.3.3
 Keywords:  C++14            |       Port:  clang-3.7
-----------------------------+--------------------------------
 Hi all,

 C++14 changed the `operator delete` that the keyword `delete` should
 invoke from unary to binary.  Currently, this operator appears to be
 missing.  FWIW, it seems to work properly with G++, even though it appears
 to call the right `operator delete`.  So I guess it means that libstdc++
 is updated, but not libc++.

 {{{
 $ 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)
 $ g++-mp-5 -std=c++14  foo.cc
 $ g++-mp-5 -std=c++14  foo.cc -c
 $ nm foo.o| c++filt | less
 0000000000000030 short EH_frame1
                  U operator delete(void*, unsigned long)
                  U operator new(unsigned long)
 0000000000000000 T _main
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/47191>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list