https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88576
--- Comment #7 from Aurelien Jarno <aurelien at aurel32 dot net> --- (In reply to Zack Weinberg from comment #5) > The C standard doesn't say malloc _will_ set errno on failure, but it also Well at least POSIX says: Otherwise, it shall return a null pointer and set errno to indicate the error. > doesn't say it _won't_, and all library functions are allowed to clobber the > value of errno unless it is specifically documented that they won't (N1570 > 7.5 [Errors], para 3, last sentence). I fully agree with that.