https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96420
Bug ID: 96420 Summary: -Wsign-extensions warnings are generated from system header macros Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: pskocik at gmail dot com Target Milestone: --- Gcc doesn't silence -Wsign-conversion warnings in the expansion of system-header macros (e.g., in the expansion of Musl's/Cygwin's FD_SET) unlike other warnings in system-header macros. E.g., #include <sys/select.h> void f(int X) { fd_set set; FD_ZERO(&set); FD_SET(X,&set); FD_CLR(X+1,&set); (void)FD_ISSET(X+2,&set); } generates -Wsign-conversion warnings when compiled with musl-gcc or with gcc on Cygwin. Arguably, this should be fixed in the respective c libs, but the treatment of -Wsign-conversion in system-header macro expansion does seem inconsistent with that of other warnings in that context.