Need doc of debug output produced by -fdump-translation-unit
Jim Wilson
wilson@specifixinc.com
Mon Jun 7 17:47:00 GMT 2004
Holger Peine wrote:
> I would like to use gcc as a front-end for a source code analysis tool.
> gcc -fdump-translation-unit produces output which seems quite promising
> for my purpose. Is the format of that output documented anywhere?
No. This info is only intended to help with debugging gcc, and it is
deliberately incomplete in some ways.
FSF policy forbids us from writing information into intermediate files
and then reading it back in later. This is because of concerns that
someone might use this feature to subvert the GPL. If a proprietary
compiler can exchange intermediate files with gcc, then they can avoid
linking with any gcc code, and thus avoid the GPL. The
-fdump-translation-unit stuff is thus intentionally crippled to try to
prevent this from happening.
Many of us would like to see this policy changed, as it hampers gcc
development, but we must respect FSF policy.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
More information about the Gcc
mailing list