On 12/19/06, Ferad Zyulkyarov <[EMAIL PROTECTED]> wrote:
tree fn_decl; tree fn_id;fn_id = get_identifier("test_fn_call"); fn_decl = lookup_name(fn_id); /* returns you a pointer to the function declaration tree */ Hope this is what you are looking for. On 12/19/06, Rohit Arul Raj <[EMAIL PROTECTED]> wrote: > Hi all, > > I am working with GCC 4.1.1. > By using the function name, is it possible to get the declaration tree > node of that function. > > e.g. using maybe_get_identifier("name"), i get the identifier node. > similarly are there any functions or macros available to get the > declaration tree node. > > Regards, > Rohit > -- Ferad Zyulkyarov Barcelona Supercomputing Center
Hi all, This works fine without optimization. tree fn_id, fn_decl; fn_id = get_identifier(name); fn_decl = lookup_name(fn_id); if i make a function call, whose declaration is of type: extern void abort(); fn_decl return NULL for all Optimizations (O1, O2, O3, Os) if no optimization is specified, it gives a proper tree. Can any body suggest what is the best way to get the Declaration tree of functions with extern declarations. Regards, Rohit
