This is an attempt to write portable code: #include <errno.h> int main() { if (errno == EWOULDBLOCK || errno == EAGAIN) return 1; return 0; } At some point, gcc -Wlogical-op started warning about this with: test.c:6:27: warning: logical ‘or’ of equal expressions [-Wlogical-op] This is unfortunate, because I find -Wlogical-op useful otherwise. Could the warning be modified to realize when the duplicate values are from macros expansion? (I'm aware of the difference between preprocessor and compiler and that this might be difficult.)
Looks like an exact dup of PR69602. *** This bug has been marked as a duplicate of bug 69602 ***