Is there a way of compiling C11 to C89?

前端 未结 2 962
悲哀的现实
悲哀的现实 2021-02-12 19:13

One of my (embedded) targets only has a C89 compiler.

I am working on a (hobby) project which targets multiple devices.

Is there a way of compiling (transpiling?

2条回答
  •  误落风尘
    2021-02-12 19:37

    As Carl Norum comments:

    What's your target? Would it be hard to port clang/llvm?

    This seems to be the promising approach.
    It's not necessary to port your target, a port for C89 is enough.

    So clang compiles your code to llvm and then llvm to c89 and then you get it.

提交回复
热议问题