You always have to #include headers directly and cannot
rely for things to be included indirectly.
You can reproduce this problem with gcc-snapshot from unstable or
gcc-4.4 from experimental.
> > Automatic build of jaula_1.4.0-2 on em64t by sbuild/amd64 0.53
...
> > libtool: compile: x86_64-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -g -O2
-MT jaula_lexan.lo -MD -MP -MF .deps/jaula_lexan.Tpo -c jaula_lexan.cc
-fPIC -DPIC -o .libs/jaula_lexan.o
> > jaula_lexan.cc: In member function 'int jaulaFlexLexer::yyinput()':
> > jaula_lexan.cc:1505: error: 'EOF' was not declared in this scope
> > make[4]: *** [jaula_lexan.lo] Error 1
> > make[4]: Leaving directory `/build/tbm/jaula-1.4.0/jaula'
The patch below will work. However, since the other #include
statements are wrapped in an #ifdef statement you may want to do this
for this #include too.
--- jaula/jaula_lexan.ll~ 2009-04-29 20:55:20.000000000 +0000
+++ jaula/jaula_lexan.ll 2009-04-29 20:56:24.000000000 +0000
@@ -50,6 +50,8 @@
#endif
}
+#include <cstdio>
+
#ifdef HAVE_SSTREAM
#include <sstream>
#endif
Kombo Morongo
library
None
Public
|
Date: 2009-05-10 09:30 Thank you for detecting the bug and the solution proposed. |
| Field | Old Value | Date | By |
|---|---|---|---|
| data_type | 945882 | 2009-05-10 09:30 | morongo |
| resolution_id | None | 2009-05-10 09:30 | morongo |
| category_id | library | 2009-05-10 09:30 | morongo |