On Thu, Mar 15, 2018 at 10:46:56PM +0100, Szabolcs Nagy wrote: > * Rich Felker [2018-03-15 15:32:44 -0400]: > > Perhaps this should be documented more explicitly, but there is no > > guarantee that building with -Werror[=anything except warnings which > > are constraint violations in C] will succeed, especially when GCC is > > not honoring its usual promise not to produce warnings for code > > expanded from macros from -isystem paths. I did just test and indeed > > the warning is produced with gcc 6.3.0. > > > > how did you reproduce it? -Wsign-conversion (or -Wconversion) > is not even enabled by Manually using -Wsign-conversion with the attached program. > what would be acceptable is some form of assertion that the > fd must be positive, however it seems nobody cares about this > warning so neither gcc nor clang tries to use available range > information to see if conversion can ever change the result: > > if (d > 0) FD_SET(d,s); > > still warns. This basically settles it that it's a buggy warning option. > if users care about this warning they should first make > sure the compilers dont emit false positives for such > trivial cases. Agreed. Rich