Not. Plan 9 developed a significant dependency of its original compilers.
Plan 9 cc is a caller compiler so main parts of the code couldn't work now
adapted in Harvey for gcc, clang and icc (intel) that are all callee. But
it's not a C problem, it's a compiler issue. Probably with Steve's pcc you
could too. Nerver tried, but it could be a good experiment.
At the end is extremely difficult not to be at any point toolchain
dependent, if Plan 9 original compilers could be improved enough to build
an standard ANSI program out of the tree (they are strongly dependent of
Plan 9 environment), also the Plan 9 code, that way you're suggesting would
be possible.
Anyway, for that, you wouldn't need any preprocessor code, also you
needen't to build amd64 or riscv with the same sources.
Álvaro
El 04/01/2017 10:12, "Tim Bradshaw" <tfb(a)tfeb.org> escribió:
So, can you build the system with both C11 compiler
and its older
compiler, from the same sources (so, no keeping two copies of the same
functionality and selecting at build time based on the compiler)? If you
can I'm impressed.
On 4 Jan 2017, at 00:12, ron minnich
<rminnich(a)gmail.com> wrote:
Well, if by single-implementation, you mean single-compiler, I have a
counter
example: Harvey is Plan 9 with just enough changed to be C11
compliant.