invalid use of type decl `enum license::Certificate_Error::E' as expression
Peter Schaefer
schaefer@cys.de
Thu Mar 11 04:35:00 GMT 1999
class xyz{
public:
struct C_Error{
enum E {NOERROR, WRONGVERSION, ACCEPTED, LAST};
E error;
C_Error(E e){ error= e; };
};
vector<C_Error> errors_c;
}
together with code
for(
vector<l::C_Error>::iterator j= errors_c.begin();
j< errors_c.end();
++j
)
{
cerr<< (*j).E;
}
causes egcs-2.91.60 to tell me to submit a full bug report:
g++ -Wall -ansi -fPIC -itypeinfo.h -frtti
-I/home/schaefer/work/cpp-lib -c -g license.cpp
license.cpp: In method `class string license::getHostId()':
license.cpp:154: warning: implicit declaration of function `int
gethostid(...)'
license.cpp: In method `license::~license()':
license.cpp:176: warning: invalid use of type decl `enum
license::C_Error::E' as expression
license.cpp:176: warning: passing `license::C_Error::E' chooses `int'
over `long unsigned int'
license.cpp:176: warning: in call to `ostream::operator <<(int)'
license.cpp:176: warning: passing `license::C_Error::E' chooses `int'
over `long int'
license.cpp:176: warning: in call to `ostream::operator <<(int)'
license.cpp:176: warning: passing `license::C_Error::E' chooses `int'
over `unsigned int'
license.cpp:176: warning: in call to `ostream::operator <<(int)'
license.cpp:176: Internal compiler error 40.
license.cpp:176: Please submit a full bug report to
`egcs-bugs@cygnus.com'.
license.cpp:176: See <URL: http://egcs.cygnus.com/faq.html#bugreport > for
details.
make: *** [license.o] Error 1
--
Peter Schaefer - schaefer@cys.de, schaefer@malaga.math.uni-augsburg.de
More information about the Gcc-bugs
mailing list