[Bug c/71287] Possibly broken invocation of connect (and maybe other) syscalls

artpol84 at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue May 31 15:18:00 GMT 2016


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.


More information about the Gcc-bugs mailing list