Just like your previous post, you seem to completely misunderstand the point of 
Nim.

  * Nim treats C as a compile target, or in other words, Nim treats C like a 
high level assembly.
  * Nim is not a "high level" C code generator or C macro builder.
  * Nim is a fully independent language, with it's own semantics.



Stop trying to force Nim to protect against C semantics.

GCC provides warnings to the user based on the assumption that they are writing 
C code by hand.

There is no expectation that Nim produces "human readable" or clean C code.

There are many things that I would not write by hand in C, but I am perfectly 
fine with generated code doing the same thing.

For example:

> Why bother to check if addresses of variables are NULL?

Because Nim does prevent this, **at a higher level**

C code optimizes out checks in the assembly code that it can prove are 
unnecessary. Similarly, Nim will not include extra checks in C code that it can 
prove are unnecessary. Nim has no way to tell GCC this is the case, so GCC 
gives warnings.

It seems to me that your real problem is that you don't trust the Nim compiler.

Reply via email to