This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Middle-End function/ function pointer generation
- From: Johannes Ziegenbalg <johannes dot ziegenbalg at googlemail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Sat, 21 Jul 2012 21:28:35 +0200
- Subject: Middle-End function/ function pointer generation
Hi guys,
I hope I'm right here. Currently I'm developing a GCC plugin and
therefore I need to generate some code which should looks like:
typedef void (bar_fn_t)(uint32_t *);
static bar_fn_t *
resolve_bar(void)
{
return bar;
}
The function "bar" is defined in the same file. The typedef is not a big
deal I think, it's something like: build_pointer_type(TREE_TYPE
(current_function_decl))
But, I stuck at this function generation, especially the return part.
Thanks for your help!!
Regards
Johannes Z.