Hi,

I am try to make a plugin to analyze GIMPLE before genericize.  It
will insert some code defined by user into the tree.  I want the user
to specify the inserted code in C.  For example,

--------------------------------------------------
{
        static int i=0;

        printf("Hello %d\n", i++);
}
--------------------------------------------------

I try to find a way to make C language parser of GCC to compile it for
me, and I will insert the code into the tree created from the main
source.  But, it seems provide only functions to parse a complete C
source file, and I try to push a buffer to the reader of libcpp.  But,
it does not work.

Does C parser of GCC provide any way to parse a file or a snippet of
code.  Should I modify the source of c-parser.c to export new
functions by my-self!?

Reply via email to