This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
egcs-971031 strange error when deleting qualified member.
- To: "'egcs at cygnus dot com'" <egcs at cygnus dot com>
- Subject: egcs-971031 strange error when deleting qualified member.
- From: "Schoder, Markus" <Markus dot Schoder at dresdner-bank dot de>
- Date: Tue, 4 Nov 1997 11:32:15 +0100
- Cc: "Fengler, Matthias" <Matthias dot Fengler at dresdner-bank dot de>
Compiling the following program (x.cpp) yields:
class Cl1
{
public:
char *c;
Cl1();
void f1();
};
Cl1::Cl1()
{
c = new char;
}
void Cl1::f1()
{
delete Cl1::c;
}
$ g++ -c x.cpp
x.cpp: In method `void Cl1::f1()':
x.cpp:18: type `char * Cl1::*' argument given to `delete', expected
pointer
^^^^^^
this looks weird
Is this correct behaviour?
Bye
Markus