Re:Main is usually a function – when is it not?
by lmm on Tuesday January 27, 2015 @09:20AM
(#8953103)
With enough macros you can do anything. I'm not aware of anyone doing this in C, but this is a cool example of doing approximately the same thing in a more easily extensible language: http://wall.org/~lewis/2013/10/15/asm-monad.html
[ Parent
| on HN ]
Re:Main is usually a function – when is it not?
by thelucky41 on Tuesday January 27, 2015 @01:29PM
(#8954734)
Being able to compile assembly directly into a C program is a very useful tool for allowing optimizations across embedded assembly. One way around it is use of intrinsics: http://en.wikipedia.org/wiki/Intrinsic_function which is basically what we're talking about.