[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug in flex using g++-3.0
From: |
Michael Vanier |
Subject: |
bug in flex using g++-3.0 |
Date: |
Tue, 7 Aug 2001 14:28:19 -0700 (PDT) |
Hi,
I'm having a problem compiling a large C++ program (GNU lilypond) using g++
version 3.0. Version 2.95 of g++ worked fine. It appears that the problem
is that flex generates invalid C++ code, and g++ version 3.0 is more anal
about standards-compliance than 2.95 was. Here are the error messages:
flex -Cfe -p -p -t lexer.ll > out/lexer.cc
"lexer.ll", line 462: warning, -s option given but default rule can be matched
rm -f ./out/lexer.dep; DEPENDENCIES_OUTPUT="./out/lexer.dep ./out/lexer.o" c++
-c -DHAVE_CONFIG_H -DSTRING_UTILS_INLINED -Iinclude -I./out
-I.././lib/include -I../lib/./out -I.././flower/include -I../flower/./out
-I../flower/include -O2 -finline-functions -g -O2 -finline-functions -g
-DSTRING_UTILS_INLINED -I/home/mvanier/local/Linux/lang/maybe-useful/include
-Wall -W -Wmissing-prototypes -Wconversion out/lexer.cc -o out/lexer.o
In file included from /usr/include/FlexLexer.h:47,
from out/lexer.cc:241:
/home/mvanier/local/Linux/include/g++-v3/backward/iostream.h:36: using
directive `istream' introduced ambiguous type `istream'
lexer.ll: In member function `virtual int My_lily_lexer::yylex()':
lexer.ll:486: cannot convert `std::istream*' to `istream*' in assignment
lexer.ll: In member function `void yyFlexLexer::yy_load_buffer_state()':
lexer.ll:1009: cannot convert `istream*' to `std::istream*' in assignment
lexer.ll: In member function `void
yyFlexLexer::yy_init_buffer(yy_buffer_state*, std::istream*)':
lexer.ll:1060: cannot convert `std::istream*' to `istream*' in assignment
/home/mvanier/local/Linux/include/g++-v3/bits/locale_facets.tcc: At top level:
lexer.ll:122: warning: `int yy_start_stack_ptr' defined but not used
lexer.ll:123: warning: `int yy_start_stack_depth' defined but not used
lexer.ll:124: warning: `int*yy_start_stack' defined but not used
lexer.ll:126: warning: `void yy_push_state(int)' declared `static' but never
defined
lexer.ll:129: warning: `void yy_pop_state()' declared `static' but never
defined
lexer.ll:132: warning: `int yy_top_state()' declared `static' but never defined
make[1]: *** [out/lexer.o] Error 1
rm out/lexer.cc
make: *** [all] Error 2
The program maintainers don't know what to do about this. Do you think
this actually is a flex problem? Unfortunately the program is way too huge
for me to reproduce this problem in a smaller form, especially since it
isn't my program. Any suggestions you might have would be appreciated.
Thanks,
Mike
- bug in flex using g++-3.0,
Michael Vanier <=