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

If that's too simple for you, you may have fun with the strlen implementation in glibc:

https://sourceware.org/git/?p=glibc.git;a=blob_plain;f=strin...



Then look at the strlen that is probably running on your computer: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/x86...


Needs a static assert instead of abort().


Excellent reply! Thanks! ..and also thanks for pointing out the obvious *magic in the code!




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

Search: