On Sat, Dec 1, 2012 at 10:32 AM, rustyBSD <[email protected]> wrote:
...
> 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,
...
> /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)'
...
> On Fedora and FreeBSD I don't have any warning.
> Am I doing something wrong, or there is a problem with vector ?

Neither.  The OpenBSD developers think that that's a useless** warning
and aren't interested in making the system header files that much
harder to read just to make it go away.

What problem are you trying to solve by using -Wredundant-decls?  Has
it *ever* caught a problem in code that you then fixed?  Or have you
always just followed modern best practices by only putting extern
function declarations in just one header file?


Philip Guenther

** some developers have much harsher language for this...

Reply via email to