Including stdlib.h and iostream generates `lldiv_t' not declared
Peter Schmid
schmid@snake.iap.physik.tu-darmstadt.de
Fri Dec 8 05:10:00 GMT 2000
When I include stdlib.h and iostream together the compilation stops
with the error messages:
cat t.C
#include <stdlib.h>
#include <iostream>
g++ -v -c t.C
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.97/specs
Configured with: ../gcc/configure --enable-shared --disable-nls --enable-threads=posix --enable-long-long
gcc version 2.97 20001207 (experimental)
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.97/cc1plus -v -D__GNUC__=2 -D__GNUC_MINOR__=97 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ t.C -D__GNUG__=2 -D__GXX_ABI_VERSION=100 -quiet -dumpbase t.C -version -fnew-abi -o /tmp/ccK34OlK.s
GNU CPP version 2.97 20001207 (experimental) (cpplib) (i386 Linux/ELF)
GNU C++ version 2.97 20001207 (experimental) (i686-pc-linux-gnu) compiled by GNU C version 2.97 20001207 (experimental).
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include/g++-v3
/usr/local/include
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.97/include
/usr/local/i686-pc-linux-gnu/include
/usr/include
End of search list.
In file included from /usr/local/include/g++-v3/bits/stl_alloc.h:53,
from /usr/local/include/g++-v3/bits/stl_string_fwd.h:18,
from /usr/local/include/g++-v3/bits/std_ios.h:40,
from /usr/local/include/g++-v3/bits/std_ostream.h:1,
from /usr/local/include/g++-v3/bits/std_iostream.h:38,
from /usr/local/include/g++-v3/iostream:1,
from t.C:2:
/usr/local/include/g++-v3/bits/std_cstdlib.h:51: `lldiv_t' not declared
/usr/local/include/g++-v3/bits/std_cstdlib.h:102: syntax error before `(' token
/usr/local/include/g++-v3/bits/std_cstdlib.h:103: syntax error before `.' token
/usr/local/include/g++-v3/bits/std_cstdlib.h:103: syntax error before `.' token
/usr/local/include/g++-v3/bits/std_cstdlib.h:106: syntax error before `(' token
/usr/local/include/g++-v3/bits/std_cstdlib.h:107: syntax error before `.' token
/usr/local/include/g++-v3/bits/std_cstdlib.h:107: syntax error before `.' token
/usr/local/include/g++-v3/bits/std_cstdlib.h:109: declaration of `long long int
atoll(const char*)' throws different exceptions
/usr/include/stdlib.h:92: than previous declaration `long long int atoll(const
char*) throw ()'
/usr/local/include/g++-v3/bits/std_cstdlib.h:110: declaration of `long long int
strtoll(const char*, char**, int)' throws different exceptions
/usr/include/stdlib.h:134: than previous declaration `long long int
strtoll(const char*, char**, int) throw ()'
/usr/local/include/g++-v3/bits/std_cstdlib.h:111: declaration of `long long
unsigned int strtoull(const char*, char**, int)' throws different exceptions
/usr/include/stdlib.h:139: than previous declaration `long long unsigned int
strtoull(const char*, char**, int) throw ()'
/usr/local/include/g++-v3/bits/std_cstdlib.h:117: parse error before `}' token
When _GNU_SOURCE is defined the compiliation finishes without a message.
I believe this should be fixed.
System setup: i686-pc-linux-gnu, GNU assembler 001002, GLIBC 2.1.3,
SUSE 6.4
Peter Schmid
More information about the Libstdc++
mailing list