GCC and fdump-translation-unit
pingu219@gmail.com
pingu219@gmail.com
Sat May 10 10:16:00 GMT 2008
I'm a student whose currently trying to build a refactoring tool for C
and I thought it might be best to dump the intermediate representation
of the source code straight from the gcc compiler frontend. However
the tokens seem to be missing stuff like full postion information and
from what I've heard function bodies aren't dumped either except with
g++ and C++ though this might be outdated info.
The tree seems to have been optimised and had alot of folding by the
time gcc dumps it so I was wondering if there was a way of getting a
complete, pre-optimised tree from gcc maybe via a commandline argument
or if there's a suitable API. I also keep hearing about how gcc's
frontend is intermingled with the backend though I'm not sure what
exactly is meant by that. It would be great to hear your thoughts on
the utility of gcc for source code analysis by an external tool.
More information about the Gcc-help
mailing list