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]

Re: Need doc of debug output produced by -fdump-translation-unit


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



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