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

It is C99 code.

It is worth noting that many C projects go for extreme portability. That's why C is used in the first place, and sometimes C99 is too much. I still sometimes work with compilers that barely support C89. That's for the aerospace industry BTW. There are even some libc that don't accept free(NULL).

If you know the platform you are writing for is not ancient, that's fine but if you are writing portable code, you have to realize these ancient platforms are still alive.

I think ditching K&R C is fine though. I've seen some of it but never encountered a case where it was the only thing the compiler supported.



> There are even some libc that don't accept free(NULL).

That’s pretty much the completely opposite of portable, since it violates the C standard.


The "extreme portability" he's talking about is portability of projects to compilers and libc implementations that behave badly, possibly in standards-violating ways like this.




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

Search: