This is the mail archive of the crossgcc@sourceware.cygnus.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more infromation.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Hi All, The constructor with a single enum argument (where the enum is defined within another class) for class C is used twice in the sample code below. The first time with an actual instance all is fine. The second time with a temporary instance the error message: // tempobj.cpp: In function `void TemporaryInstance()': // tempobj.cpp:33: `class C Id::ID' is not a static member of `class Id' appears. It may be that I am misusing the language but similar code does compile cleanly on native Win32 (M$ Visual C++ 6.0) as well as compilers for AS/400 and System/390. The compiler version is reported as: Reading specs from /xegcs/lib/gcc-lib/i586-linux-gnu/egcs-2.91.66/specs gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release) This compiler was built using a Canadian cross process with the Cygwin b20.1 sources on a SuSE 6.1 Linux system. Help! Thanks, Kevin. Kevin Farrell Software Developer <mailto: kfarrell@seagull.nl> SEAGULL IRELAND Swords Business Plaza, Main street, Swords, Co. Dublin, Ireland P.O.Box 6751, Swords. Tel. +353 1 8903090, Fax +353 1 8903089 http://www.seagullsw.com/ ################# BEGIN ################################################### class Id { public: enum E { ID }; }; class C { public: C(); C(Id::E evalue); }; void ActualInstance() { C actual(Id::ID); } void TemporaryInstance() { // gcc -v reported: // Reading specs from /xegcs/lib/gcc-lib/i586-linux-gnu/egcs-2.91.66/specs // gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release) // gcc -c tempobj.cpp reports: // tempobj.cpp: In function `void TemporaryInstance()': // tempobj.cpp:33: `class C Id::ID' is not a static member of `class Id' C(Id::ID); } ################# END ################################################### ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |