gcc 4.3pre (20070824) vs. gmp.h: error: std::FILE has not been declared
Michael.Abshoff at fsmath.mathematik.uni-dortmund.de
Sun Aug 26 02:24:18 CEST 2007
I ran into the following problem when compiling the following AC_CHECK
snippet with gcc 4.3pre (20070824 snapshot) when using gmp release 4.2.1:
[mabshoff at m940 src]$ cat gmp-version-check.c
int main ()
if (__GNU_MP_VERSION < 4)
[mabshoff at m940 src]# g++ -I ../../../../local/include/ gmp-version-check.c
In file included from gmp-version-check.c:1:
../../../../local/include/gmp.h:515: error: std::FILE has not been declared
(the code compiled fine with gcc, because the offending bit is ifdefd with
__cplusplus). Removing the offending "using std::FILE" make the code in
question (which originated in the AC_CHECK of givaro) and givaro itself (a
C++ library for arithmetic and algebraic computations) compile. But the
sample problem should show up in any C++ libary or code including gmp.h
Now my questions:
- Is that the recommended work-around or am I doing something wrong?
- I have to admit my ignorance: Why are we using "using std::FILE" there?
Is it even needed for g++?
More information about the gmp-bugs