Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

From comments:

> avoiding [...] errno

Note that errno can be optimized by a sufficiently smart compiler, simply by treating it as a register, then annotating various functions with whether it is preserved, clobbered, or conditionally used for return.

The libc boundary is quite annoying though; for this case in particular, that it doesn't expose the fact that errno is at a fixed offset from the TLS register. And generally, libc is vehemently opposed to the existence of smart compilers, since all libc calls are expected to be treated as opaque barriers.



well, yes, but you need whole-program compilation.


> And generally, libc is vehemently opposed to the existence of smart compilers

Yes, as far as I'm aware none of the major libcs on Linux support LTO




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: