This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Insert global varible declaration with a plugin
- From: Pedro Paredes <0narcoboy0 at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 24 Sep 2014 16:57:06 -0300
- Subject: Insert global varible declaration with a plugin
- Authentication-results: sourceware.org; auth=none
I would know if it's possible to insert a global variable declaration
with a gcc plugin. For example if I got de following code:
---------------------------------------test.c------------------------------------
int main(void) {
return 0;
}
------------------------------------------------------------------------------------
and I want to transform it with a plugin into:
------------------------------------------------------------------------------------
int fake_var;
int main(void) {
return 0;
}
------------------------------------------------------------------------------------
Is that possible? If it's possible, in wich pass a how can I do it?