This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Misleading (incorrect?) error message
- To: egcs-bugs at cygnus dot com
- Subject: Misleading (incorrect?) error message
- From: Jason Gunthorpe <jgg at gpu dot srv dot ualberta dot ca>
- Date: Fri, 24 Oct 1997 19:23:43 -0600 (MDT)
Hi,
Try to compile this short test program:
typedef struct
{
} GC; // Line 3
class AClass
{
GC *TheGC; // Line 7
public:
AClass *GC; // Line 10
};
> eg++ -c t.cc
t.cc:10: declaration of identifier `GC' as `class AClass * GC'
t.cc:3: conflicts with other use in class as `struct GC'
The warning says that the declaration at line 10 conflicts with the
'other' use with the type 'struct GC' and points to line 3, the definition
of 'struct GC'
IMHO this is confusing and should read
t.cc:10: declaration of identifier 'GC' as 'class AClass * GC'
t.cc:7: conflicts with other use in class as 'struct GC'
Which seems more consistant and usefull.
This is with egcs snapshot 970904.
Thanks,
Jason