I try to make a bundle with the the following legal code

#include <stdio.h>

void *operator new(size_t size)
{  void *vp;  return vp;}

void *operator new[](size_t size)
{   return ::operator new(size);}


and I obtain

[/Users/fca/nd] /opt/gcc-4_0/bin/g++ -c NewDelete.cxx 
[/Users/fca/nd] /opt/gcc-4_0/bin/g++ -g -bundle -undefined dynamic_lookup -o 
libNewDelete.so 
NewDelete.o 
/usr/bin/ld: NewDelete.o has external relocation entries in non-writable 
section (__TEXT,__textcoal_nt) 
for symbols:
operator new(unsigned long)
collect2: ld returned 1 exit status

It works with gcc version 3.3 20030304 (Apple Computer, Inc. build 1671)

-- 
           Summary: Legal code generate wrong binary
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: federico dot carminati at cern dot ch
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-apple-darwin7.8.0
  GCC host triplet: powerpc-apple-darwin7.8.0
GCC target triplet: powerpc-apple-darwin7.8.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20799

Reply via email to