C++ into C code conversion

Dear LLVM users and developers,

We have been read that
there is possible to translate from C++ to another language using Clang
http://stackoverflow.com/questions/9900240/how-to-use-clang-to-translate-from-c-to-another-language

We have same problem that we are to port third party C++ user space code
into Linux kernel code where is only available to use C source code.

I would like to be informed if there is possibility to do so and to
achieve source of more detailed instructions.
Is it possible to answer this question,please?

I look forward hearing form you

Yours faithfully

Peter Fodrek

Dear Mr. Chisnall!
thank you for you help
V Nedeľa, 26. máj 2013 o 15:33 +0100, David Chisnall napísal(a):

> We have same problem that we are to port third party C++ user space code
> into Linux kernel code where is only available to use C source code.

If you want to get your code upstream, then machine-translated code is
unlikely to give you something that will be accepted.

It is just for our internal use,

  If, however, you do not then you should be aware that there is no problem
running any C++ code that does not depend on RTTI and other ABI library functions inside a kernel...

We have code where third party device driver is written using RTAI as kernel module
bu application is written as user space program. RTAI does not enable us
to use both user space hard real-time and kernel space hard real-time program
at the same time. User space program without RTAI is slower the is our maximal
tolerance therefor we need to port application as kernel module to use RTAI.

Kernel builder is unable to original program due to missing symbols form, C++
library even when we finished all our ideas to dismiss these symbols.
Therefor we are looking to tool that helps us to find out our misstakes, yet

I look forward hearing form you

Yours faithfully

Peter Fodrek

An automated C++ to C translation tool would most likely not help with such a thing, as it would aim to produce semantically equivalent code and therefore miss the same symbols. If your code is restricted to the Embedded C++ subset, then it should have no dependencies on the C++ runtime and so be suitable for use in a kernel. Perhaps you can list the missing symbols?

David