3 ms·
> It is possible to implement C faithfully on these platforms, including all of C's weirdness like pointer-arithmetic and unsafe casting. Of course it can. The
by jdmichal 11y ago
> It is possible to implement C faithfully on these platforms, including all of C's weirdness like pointer-arithmetic and unsafe casting.
Of course it can. The two platforms you listed can both faithfully emulate an entire computer, upon which you can build your C runtime.
http://bellard.org/jslinux/ http://bellard.org/jslinux/
http://bellard.org/jslinux/tech.html http://bellard.org/jslinux/tech.html
Now, if what you really meant was more along the lines of "can I faithfully cross-compile C to Java bytecode", the answer would be "not without a layer of abstraction".