Re: GCC Plugin to insert new expressions/statements in the code

2020-07-15 Thread Richard Biener via Gcc
On Tue, Jul 14, 2020 at 11:23 PM Masoud Gholami wrote: > > Hi, > > I am writing a plugin that uses the PLUGIN_PRAGMAS event to register a > custom pragma that is expected to be before a function call as follows: > > int main() { > > char *filename = “path/to/file”; > #pragma inje

GCC Plugin to insert new expressions/statements in the code

2020-07-14 Thread Masoud Gholami
Hi, I am writing a plugin that uses the PLUGIN_PRAGMAS event to register a custom pragma that is expected to be before a function call as follows: int main() { char *filename = “path/to/file”; #pragma inject_before_call File *f = fopen(filename, …); // marked