This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/69602] [6 Regression] over-ambitious logical-op warning on EAGAIN vs EWOULDBLOCK
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 02 Feb 2016 10:51:23 +0000
- Subject: [Bug c/69602] [6 Regression] over-ambitious logical-op warning on EAGAIN vs EWOULDBLOCK
- Auto-submitted: auto-generated
- References: <bug-69602-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69602
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Even if we look through macros, I'd actually think we should warn here.
Because this is actually:
#define EAGAIN 11
#define EWOULDBLOCK EAGAIN
extern int *__errno_location (void) __attribute__ ((__nothrow__, __leaf__,
__const__));
#define errno (*__errno_location ())
int
foo ()
{
if (errno == EAGAIN || errno == EWOULDBLOCK)
return 1;
return 0;
}
and even errno.h claims that EWOULDBLOCK is EAGAIN.
The warning on this started with r222408.