Using "Checked C" compiler with Nim

2020-08-11 Thread moerm
Here is a real world example excerpt taken from some of my C code (with anonymized function and var names) so you can see how it looks like: #include //... typedef struct { uint32_t P checked[128]; uint32_t Q checked[128]; } FOO_State; //... u

Using "Checked C" compiler with Nim

2020-08-11 Thread moerm
You must understand what it's about and how it works. If you just use it like a normal C compiler, it will behave like that (specifically like clang) which isn't particularly useful and adds nothing in terms of safety/correctness. For that you must "annotate" the C code, in particular arrays and

Using "Checked C" compiler with Nim

2020-08-11 Thread Mats
Hi, I stumbled on the Microsoft opensource (MIT) "Checked C" project, has anyone tried using this safer c compiler (based on clang/llvm) as NIM compiler? I guess being able to use "Checked C" with NIM would build an even stronger case for NIM as a safe programming language. [https://www.micros