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

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



At Sat, 21 Aug 2004 01:38:42 +0200,
Jeroen T. Vermeulen <jtv@xs4all.nl> wrote:
> The __FDMASK macro in <sys/select.h> casts the integer 1 to an __fd_mask
> (which is required to be a long int).  This C-style cast yields a
> warning in application code when compiling in C++, breaking builds that
> treat warnings as errors.
> 
> Defining separate versions for C and C++, with different cast syntax,
> would be unnecessarily bulky.  Instead, I would propose to turn the
> constant "1" (int) into "1L" (long int) and remove the cast.

Which compiler did you use?  It should not be happneded with gcc/g++.
Plus, did you check it's OK in C++ standard?

Regards,
-- gotom



Reply to: