On 18/01/2022 09:04, Andreas Schwab wrote: > On Jan 18 2022, Adhemerval Zanella wrote: > >> I think this is a implementation detail, I am not aware that either C or >> POSIX now states it should initialized to any specific value (in fact, >> POSIX at Issue 5 [1] has removed the 'The value of errno is 0 at program >> start-up' on its description). > > It's still part of the C standard, though. > And I think it is error-prone, since it requires caller to handle two different assumptions (whether the function is called after program initialization or after errno might be clobbered).