[Uml-devel] Compile error in tokenizer.cc (gcc3)

Dan Armak danarmak at gentoo.org
Mon Jul 29 10:50:04 UTC 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello uml people,

I am packaging the uml cvs snapshot for Gentoo Linux (x86, gcc 3.1) and have 
run into compile problems of the gcc3 type (i.e. that wouldn't occur with 
gcc2):

g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/kde/cvs/include -I/usr/qt/3/include 
- -I/usr/X11R6/include   -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wnon-virtual-dtor 
- -Wno-long-long -Wbad-function-cast -Wundef -Wall -pedantic -W -Wpointer-arith 
- -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE 
- -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new  -c -o 
tokenizer.o `test -f tokenizer.cc || echo './'`tokenizer.cc
tokenizer.cc:146: syntax error before `*' token
In file included from /usr/include/g++-v31/backward/iostream.h:31,
                 from /usr/include/FlexLexer.h:47,
                 from tokenizer.cc:238:
/usr/include/g++-v31/backward/backward_warning.h:32:2: warning: #warning This 
file includes at least one deprecated or antiquated header. Please consider 
using one of the 32 headers found in section 17.4.1.2 of the C++ standard. 
Examples include substituting the <X> header for the <X.h> header for C++ 
includes, or <sstream> instead of the deprecated header <strstream.h>. To 
disable this warning use -Wno-deprecated.
tokenizer.cc:735:5: warning: "YY_STACK_USED" is not defined
tokenizer.cc: In member function `virtual int yyFlexLexer::yylex()':
tokenizer.cc:1318: `struct yy_buffer_state' has no member named 
`yy_input_file'
tokenizer.cc:905: warning: label `find_rule' defined but not used
tokenizer.cc: In member function `void yyFlexLexer::yy_load_buffer_state()':
tokenizer.cc:1849: `struct yy_buffer_state' has no member named 
`yy_input_file'
tokenizer.cc: In member function `void 
yyFlexLexer::yy_init_buffer(yy_buffer_state*, std::istream*)':
tokenizer.cc:1900: `struct yy_buffer_state' has no member named 
`yy_input_file'
tokenizer.cc: In member function `virtual void yyFlexLexer::LexerError(const 
char*)':
tokenizer.cc:1996: warning: unused parameter `const char*msg'
tokenizer.cc:2090:5: warning: "YY_MAIN" is not defined
/usr/include/g++-v31/streambuf: At top level:
tokenizer.cc:2069: warning: `void* yy_flex_realloc(void*, unsigned int)' 
defined but not used
make[3]: *** [tokenizer.o] Error 1
make[3]: Leaving directory `/usr/src/uml/uml/classparser'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/uml/uml'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/uml'
make: *** [all] Error 2

- ---------
tokenizer.cc:146: syntax error before `*' token is the important part. As I 
understand it gcc3 wants you to explicitly say "uses namespace std;" or else 
to change line 146 from "istream* foo" to "std:istream* foo". I tried that 
but there were more compile problems of the same type further on and I gave 
up.

I hope someone among you has gcc3 or is willing to fix this. I didn't try to 
because it looked to become a big patch and the lex.yy.cc preprocessor 
mangling is quite intimidating :-)

- -- 
Dan Armak
Gentoo Linux developer (KDE)
Matan, Israel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9RYIpUI2RQ41fiVERAsofAJ9yP81YE6jUoRMU89bzruO66wp9bQCfeJbc
JhvSo76MbLfs8NuiSukvddc=
=XMIv
-----END PGP SIGNATURE-----





More information about the umbrello-devel mailing list