This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

egcs-971105 bugs


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]