[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#271062: /usr/include/sys/select.h: fd_set warnings in C++



On Sun, Sep 12, 2004 at 02:29:20AM +0900, GOTO Masanori wrote:
 
> Which compiler did you use?  It should not be happneded with gcc/g++.

It did.  I tried with g++ 3.3 and 3.4, and both give this warning.  I know
g++ and gcc don't normally give warnings for the standard headers, but in
this case the problem occurs in a macro, so the actual warning is located
in the source file, not the header.

One important fact I forgot to mention is that I enable a lot of warning
options.  The warning does not occur with the default configuration, but I
do get it with -Wold-style-cast.  Which is otherwise a perfectly reasonable
option to use and doesn't evoke any other warnings in this 10,000-line
project.


> Plus, did you check it's OK in C++ standard?

I'm not sure there's anything to check...  The macro itself is clearly
implementation-defined, the typedef (which also starts with underscors to
indicate it's implementation-private) is given just above it in the same
header file, and the comment says that, crazy as it sounds to use a signed
type for a bitmask, the type used in fd_set _must_ be a signed long.  So
there's nothing I can see going wrong because of this change.


Jeroen




Reply to: