Hi,
I have the file test.cpp, containingonly:

#include <vector>
   int main()
   {
   }

Icompile it with

   $ g++ -Wredundant-decls -o test test.cpp

And I get

In file included from 
/usr/include/g++/amd64-unknown-openbsd5.2/bits/gthr-default.h:44,
                  from 
/usr/include/g++/amd64-unknown-openbsd5.2/bits/gthr.h:114,
                  from 
/usr/include/g++/amd64-unknown-openbsd5.2/bits/c++io.h:43,
                  from /usr/include/g++/iosfwd:46,
                  from /usr/include/g++/bits/stl_algobase.h:70,
                  from /usr/include/g++/vector:66,
                  from test.cpp:1:
/usr/include/unistd.h:333: warning: redundant redeclaration of 'off_t 
lseek(int, off_t, int)' in same scope
/usr/include/sys/types.h:208: warning: previous declaration of 'off_t 
lseek(int, off_t, int)'
/usr/include/unistd.h:372: warning: redundant redeclaration of 'int 
ftruncate(int, off_t)' in same scope
/usr/include/sys/types.h:209: warning: previous declaration of 'int 
ftruncate(int, off_t)'
/usr/include/unistd.h:386: warning: redundant redeclaration of 'int 
mkstemp(char*)' in same scope
/usr/include/stdlib.h:208: warning: previous declaration of 'int mkstemp(char*)'
/usr/include/unistd.h:387: warning: redundant redeclaration of 'char* 
mktemp(char*)' in same scope
/usr/include/stdlib.h:177: warning: previous declaration of 'char* 
mktemp(char*)'
/usr/include/unistd.h:391: warning: redundant redeclaration of 'int 
setkey(const char*)' in same scope
/usr/include/stdlib.h:193: warning: previous declaration of 'int setkey(const 
char*)'
/usr/include/unistd.h:397: warning: redundant redeclaration of 'int 
truncate(const char*, off_t)' in same scope
/usr/include/sys/types.h:210: warning: previous declaration of 'int 
truncate(const char*, off_t)'
/usr/include/unistd.h:466: warning: redundant redeclaration of 'char* 
mkdtemp(char*)' in same scope
/usr/include/stdlib.h:240: warning: previous declaration of 'char* 
mkdtemp(char*)'
/usr/include/unistd.h:467: warning: redundant redeclaration of 'int 
mkstemps(char*, int)' in same scope
/usr/include/stdlib.h:274: warning: previous declaration of 'int 
mkstemps(char*, int)'

On Fedora and FreeBSD I don't have any warning.
Am I doing something wrong, or there is a problem with vector ?

Thanks !

Reply via email to