Date: Thu, 15 Mar 2018 18:38:01 -0400 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: Re: #define __MUSL__ in features.h On Thu, Mar 15, 2018 at 10:46:56PM +0100, Szabolcs Nagy wrote: > * Rich Felker <dalias@...c.org> [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 View attachment "signed-conversion.c" of type "text/plain" (112 bytes)
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.