Has anyone defined a strict subset of C to be used as target for compilers? Or ideally a more regular and simpler language, as writing a C compiler itself is fraught with pitfalls.
Sounds like why LLVM was created? (and derivatives like MLIR and NaCL) Its IR is intended be be C-like, except that everything is well-defined and substantially more expressive than C.
https://en.wikipedia.org/wiki/C-- for example?
For portability, hopefully C89 as well?
Not precisely, but C-- (hard to search for!) was a C-like (or C subset?) intermediate language for compilers to generate.
I found this Reddit thread that gives a bit more detail:
https://www.reddit.com/r/haskell/comments/1pbbon/c_as_a_proj...
and the project link:
https://www.cs.tufts.edu/~nr/c--/