Re: Fwd: GCC front end and GCC internals

2017-03-31 Thread Andre Groenewald
What a blunder. > But you do know that methods have an extra (first, actually) parameter > containing the this pointer, right? I totally missed it. Thank you for informing me. I tested it with a dummy parameter. The dummy parameter taking the place of the this pointer. It worked perfectly.

Re: Fwd: GCC front end and GCC internals

2017-03-31 Thread Martin Jambor
Hi, On Fri, Mar 31, 2017 at 08:56:26AM +0200, Andre Groenewald wrote: > Sorry about the fwd in the description. > > This is my implementation: > > fnDeclType = build_function_type_array(integer_type_node, > argVect.NumOfItems, parmTypes); > tree fnDecl = build_fn_decl(identifier->Str,

Re: Fwd: GCC front end and GCC internals

2017-03-31 Thread Andre Groenewald
Sorry about the fwd in the description. This is my implementation: fnDeclType = build_function_type_array(integer_type_node, argVect.NumOfItems, parmTypes); tree fnDecl = build_fn_decl(identifier->Str, fnDeclType); DECL_EXTERNAL(fnDecl) = 1; fnAddr = build1(ADDR_EXPR,

Re: Fwd: GCC front end and GCC internals

2017-03-30 Thread Martin Jambor
Hello, I am not sure if I can help you but... On Thu, Mar 30, 2017 at 08:05:07AM +0200, Andre Groenewald wrote: > I am discovering the awesome world of GCC internals. I managed to > develop a basic front end. It can call internal and external functions > and link with standard libraries. All is

Fwd: GCC front end and GCC internals

2017-03-30 Thread Andre Groenewald
I am discovering the awesome world of GCC internals. I managed to develop a basic front end. It can call internal and external functions and link with standard libraries. All is good. The hunger for more does not end. I want to call c++ libraries and interact with c++ objects. My starting point