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? Would it be possible to do certain initialisation steps only once? Does gcc leak memory? Would it be able to run for extended periods of time, without having to end the process? Which parts of the compiler are reentrant/thread safe? Is the state nicely encapsulated or strewn across loads of globals/statics?

Best regards,
JK

Reply via email to