https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69602
--- Comment #11 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- (In reply to Gerald Pfeifer from comment #10) > (In reply to Jakub Jelinek from comment #8) > > if (errno == EAGAIN || (EWOULDBLOCK != EAGAIN && errno == EWOULDBLOCK)) > > could be better workaround. > > This is WAY more complicated to read and understand than the original > approach. I understand you only called it a workaround, but I am pretty > sure both GCC and Wine maintainers (and presumably others) would shoot > such obfuscation down if it's for the sake of avoiding a warning. Unfortunately, we are very far away from implementing anything better [*], short of completely disabling the warning, which can be done by users with #pragma GCC diagnostic for specific cases or simply by not using -Wlogical-op. As Marek said, many warnings suffer from this inability to see macros before expansion, and this is why they are not enabled by -Wall (or even by -Wextra). [*] Fixing this will not only require making the folding procedures recognize macros and handle them specially for the sake of some warnings which want to look at code as written by the user, not as represented internally by gcc; it will also require adding virtual locations to a lot of source level entities that don't have them (PR43486). I would not expect to see the latter in the near future; it has proven to be a very hard problem to crack.