https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71287
--- Comment #13 from Artem Polyakov <artpol84 at gmail dot com> --- Oh, now I see what was going on! This is a really masked error: while( (rc = connect(sd, (struct sockaddr*)&address, addrlen) < 0) && (errno == EAGAIN) ); instead of: while( (rc = connect(sd, (struct sockaddr*)&address, addrlen)) < 0 && (errno == EAGAIN) ); so the problem is in the code, not GCC: wrong operation sequence: rc = (connect(sd, (struct sockaddr*)&address, addrlen) < 0) instead of (rc = (connect(sd, (struct sockaddr*)&address, addrlen)) < 0 So we can safely close this bug report. Sorry for the false alarm.