This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

GCC Help


Hello everyone,

Being a beginer at building front ends, I could use a little help
or a push in the right direction.

I am trying to do the following source to source transformation
inside the C compiler ( as a new front-end of course )

fun( a, g(2), p )

becomes:

struct { void* arg0, int arg1, int arg2, int *result } __desc = { myWrapper,
a, g(2), p };

I have tried to replace the action for building function calls
in the "primary : primari '(' exprlist ')' rule but ran in to many problems.

Am I on the right track?
Perhaps someone has already done this?

Also how can I create a global declaration while parsing a function
i.e. the declaration of my wrapper functions.  It seems that the nodes
get destroyed as soon as the parsing of the function is done.

By the way, when this compiler is done it will be realeased as a new
front-end
to gcc ( GPL ) along with the accompanying library ( GPL ).

Thanks,  Eric ;-)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]