@cblake I think it should be handled at nim level, because it can be hadled at 
Nim level. The more things can be resolved at the Nim side, the more powerful 
the language is. On the other side, Nim does not only have a C backend, it also 
has an LLVM backend. I do not know the state of this backend or how LLVM 
actually works, but I could imagine that here it is part of the nim compiler to 
define the alignment. And it is also not too complicated to implement this 
behaviour backend dependent. The algorithm that runs on each backend is exactly 
the same, it is only the alignment value of different types that might change 
between backends. So it boils down to a simple mapping from a type bachend 
pairr to an alignment value. This map needs to be complete though.

Reply via email to