Re: Calling compiler from C program...

2012-11-08 Thread Basile Starynkevitch
On Thu, Nov 08, 2012 at 05:41:04PM +0100, Johann Klammer wrote: > Hello, > Some compilers feature function call interfaces for on-the-fly > compilation (C# and lcc). And most importantly, LLVM/Clang. (And also tinycc). LLVM is mostly a library to generate quite good machine code from some interna

Calling compiler from C program...

2012-11-08 Thread Johann Klammer
Hello, Some compilers feature function call interfaces for on-the-fly compilation (C# and lcc). Now I wonder if this is possible with gcc. Is there a documented/stable interface for compiling snippets of C code programatically from inside a C program? If not, how much work would it involve? Wou