This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Gcc plugin for modification of source code ?
- From: Mohsin Khan <mohsin1510 at gmail dot com>
- To: gcc <gcc at gcc dot gnu dot org>, "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Sun, 15 Jun 2014 02:40:32 +0530
- Subject: Gcc plugin for modification of source code ?
- Authentication-results: sourceware.org; auth=none
Hi,
I'm working on a gcc plugin project. I had a doubt, can somebody help
me on this.
Can we write a plugin (which works after a pass like cfg or any other)
which can modify the source code of .C file, for example insert
comments before function definitions or insert a new IF Block in the
.C file. And after modification it writes the entire modified code to
a new .C file. Is this type of plugin possible in GCC. If yes, please
tell me how and if No, please tell me why.
Any help is much appreciated.
Thanks