On May 22, 2016, at 6:09 AM, Mouse <mo...@rodents-montreal.org> wrote:
> 
> I've often thought about building a C implementation that goes out of
> its way to break assumptions like "integers are two's complement with
> no padding bits" or "floats are IEEE" or "nil pointers are all-bits-0"
> or "all pointers are the same size and representation" or etc.

Just use Symbolics C on a Symbolics or ZetaC on a TI Explorer. (ZetaC was 
recently put in the Public Domain by its author, so you can take a look at how 
it was implemented.) Both of them I believe implemented C89.

There’s also someone writing a C to Common Lisp translator that takes some of 
the same approaches as those compilers: <https://github.com/vsedach/Vacietis> 
Something like that would make it possible to pull C code into a project like 
Mezzano.

(Another approach would be to write an LLVM back-end that generates Common Lisp 
using the same approach as ZetaC, and port clang to it.)

  -- Chris

Reply via email to