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

So what the improvements between C89 and C18 in regards to UB and security, for any ISO C compliant compiler?


Between c89 and c18 is close to 30 years.

What about between c99 and c18? Is there anything you can think of? I think the _s() functions, advertised as security features, are a weak effort. Anything else come to mind?


Nothing really, if anything VLAs have proven such a mistake that Google lead an effort to remove all instances of VLA use out of the Linux kernel.

Also the amount of UB descriptions just increased and are now well over 200.

Annex K was badly managed, a weak effort as you say, given that pointer and size were still handled separately, and in the end instead of coming up with a better design with struct based handles, like sds, everything was dropped.

ISO C drafts are freely available, I recommend everyone that thinks that they know C out of some book, or have only read K&R book, to actually read them.




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

Search: