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] |
Other format: | [Raw text] |
t_new_stmt = build_nt(EXPR_STMT, t_call);
cause compilation errors. Now, has the notion of statements been removed in gcc-4, and in that case what has replaced it? I am quite confused at the moment so if something doesn't make sense I'd be very happy with any kind of explanation that makes me understand again. The following piece of code is what I'm working with at the moment. It compiles but doesn't really cause anything to happen when run.
void ci_insert_call(tree t_func, const char* func_name, tree args) { tree t_func_decl; tree t_body; tree t_first_stmt;
tree t_call; tree t_new_stmt;
t_body=DECL_SAVED_TREE(t_func); // COMPOUND_STMT /* t_first_stmt = COMPOUND_BODY(t_body); */
gem_find_symtab(&t_func_decl, func_name); t_call=build_function_call(t_func_decl, args); t_new_stmt = build_nt(CALL_EXPR, t_call); /* TREE_CHAIN(t_new_stmt)=TREE_CHAIN(t_first_stmt); */ /* TREE_CHAIN(t_first_stmt)=t_new_stmt; */ tree_stmt_iterator itor; itor = tsi_start(t_body); tsi_link_before(&itor, t_new_stmt, TSI_SAME_STMT); }
Cheers! /Björn Skoglund
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |