This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
egcs-971105 bugs
- To: "'egcs at cygnus dot com'" <egcs at cygnus dot com>
- Subject: egcs-971105 bugs
- From: "Schoder, Markus" <Markus dot Schoder at dresdner-bank dot de>
- Date: Fri, 14 Nov 1997 09:50:10 +0100
The following 3 code snippets fail to compile on egcs-971105. I think
all
of them are ANSI compliant.
---
struct A { char *p; void f(); };
void A::f() { delete A::p; }
---
egcs1.cc: In method `void A::f()':
egcs1.cc:2: type `char * A::*' argument given to `delete', expected
pointer
egcs is clearly misinterpreting A::p as a pointer to member
(delete[] A::p does work though).
---
struct A { enum { a } *x; int f() { return a; } };
---
egcs2.cc: In method `int A::f()':
egcs2.cc:1: `a' undeclared (first use this function)
egcs2.cc:1: (Each undeclared identifier is reported only once
egcs2.cc:1: for each function it appears in.)
This is an obvious egcs bug.
---
struct A {};
struct B { A A; };
---
egcs3.cc:2: declaration of identifier `A' as `struct A A'
egcs3.cc:1: conflicts with other use in class as `struct A'
I'm not completely sure about that one.
Bye
Markus