C2 forum
General Category => General Discussion => Topic started by: bas on February 26, 2014, 03:43:47 PM
-
There are initiatives that try to improve the current C language. Below is a list of
initiatives I know of, but I'm also interested if there are others I don't know of yet.
- Clang modules
- Link-time optimization
- Clang Virtual FS (http://www.phoronix.com/scan.php?page=news_item&px=MTYwOTM)
- #pragma once
- pre-compiled headers
- Amalgation (merging c/h files together into 1 big file)
While these initiatives are nice, I feel they fall short of really improving the language. This is
understandable, because they try to remain compatible with C on a language level. I feel that
keeping this compatibitily at a lower (link/library?) level, allows for far greater improvements.
Hopefully we'll be able to demonstrate some in C2.
Edit: interesting LTO link: http://hubicka.blogspot.co.uk/2014/04/linktime-optimization-in-gcc-1-brief.html
Bas
-
Several compilers did bounds checking on arrays over the years, but the only one I can think of that still has it as an option (you might have to built it with the option) is TCC.
With all the damage that recent security holes in C code have cause where buffer overflows played a big role, maybe it is time to think about bounds checking arrays.
Best,
Kyle