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]

insert global variable declaration with gcc plugin


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]