[GENERIC] problem when adding 2 VAR_DEC in the main function

Ian Lance Taylor iant@google.com
Wed Oct 27 18:56:00 GMT 2010


charfi asma <charfiasma@yahoo.fr> writes:

> Now, How can I generate a call to this method in my front end ? the call_exp did 
> not contains an object argument ? it only contains the name of the function, 
> numer of arguments and list of arguments.

That's right, except that it doesn't have the name of a function.  It
has an expression for the function to call.  For a simple function call,
it will be a FUNCTION_DECL.  But it can be any expression in general.
To call a method, you have to construct an expression which refers to
the method.  In C++, for example, this would mean an expression which
loads a function pointer from a vtable.

Ian



More information about the Gcc-help mailing list