[Bug c++/18866] New: delete via pointer-to-member

wolfgang dot roehrl at de dot gi-de dot com gcc-bugzilla@gcc.gnu.org
Tue Dec 7 11:26:00 GMT 2004


Dear all,

I would like to post a fault report for the GNU C/C++ compiler 3.3-e500.

We use the compiler to generate code for a PowerPC processor.

Used invokation line for the GNU C++ compiler:

ccppc -c -x c++ -ansi -Wall -Werror -mcpu=8540 -fverbose-asm -mbig
      -fmerge-templates -mmultiple -mno-string -mstrict-align -O3
      -fno-exceptions -fno-rtti -fno-builtin-printf
      -I<different include paths>
      -D<differen #define's>
      K.CPP -oK.O



// example program

struct X { char c; };

void f (char X::* p)
{
    delete p;
    delete[] p;
}


The compiler translates this without complaints even though the parameter p
doesn't have pointer type (it has pointer-to-member type).

With kind regards
W. Roehrl

-- 
           Summary: delete via pointer-to-member
           Product: gcc
           Version: 3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: wolfgang dot roehrl at de dot gi-de dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: sparc-sun-solaris2.5.1
  GCC host triplet: i386-pc-mingw32
GCC target triplet: powerpc-wrs-vxworks


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



More information about the Gcc-bugs mailing list