This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
name resolutions bug
- To: egcs at cygnus dot com
- Subject: name resolutions bug
- From: "Ryan VanderBijl" <rvbijl39 at hotmail dot com>
- Date: Thu, 26 Feb 1998 08:40:36 PST
Hi,
I believe i found a bug...
In compiling with:
gcc version egcs-2.90.23 980102 (egcs-1.0.1 release)
and with this code:
----start:----
enum TestEnum { First, Second, Third };
class TestClass
{
public:
TestClass();
void Second();
private:
TestEnum
myVar;
}
inline TestClass::TestClass()
{ //this is line 16
myVar = Second; //this is line 17
}
----:end----
I get these errors:
testcase.cc:16: return type specification for constructor invalid
testcase.cc: In method `TestClass::TestClass()':
testcase.cc:17: warning: assuming & on `TestClass::Second()'
testcase.cc:17: assignment to `TestEnum' from `void (TestClass::*)()'
I'm not sure about the first (line 16).... i just saw that when i made
this
testcase, but on the second(line 17), it seems to me that the compiler
(egcs, and i've also tested it on g++ 2.8.0) is not name resolving
properly, i would think that there should at least be an warning
that the names declared in the Enum are the same as used by the class.
Thanks,
Ryan
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
testcase_cc