[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: about header file parsing
On 1/9/19 4:03 PM, akrl wrote:
Sorry I try to explain it better.
I was thinking to a gcc plugin (or potentially something else) that
given a C file produce the libgccjit code necessary to fill a context
with what is in the source file.
That could not work in general, because C has macros (think of the `EOF`
macro constant in `<stdio.h>`) that have no equivalent in libgccjit. And
in practice C macros are very important (and a lot of API for C are
using macros, see also macros such as WIFEXITED in wait(2) on some Linux
system).
We have to admit that C and libgccjit are different "languages" (even if
conceptually very close). And a C API is not exactly a set of "objects"
that libgccjit can handle.
Cheers
--
Basile STARYNKEVITCH == http://starynkevitch.net/Basile
opinions are mine only - les opinions sont seulement miennes
Bourg La Reine, France