This is the mail archive of the 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: tree-dump inquiry

On Tue, 19 Aug 2003 at 17:55, Jim Wilson wrote:
> Dan DaCosta wrote:
> > I am currently using the tree dumper flag in g++ 3.2.3.  After working with .original file
> > for a little bit I realized that there was no way to tell what order the parameters were
> > specified in a function declaration.
> The tree and rtl dumps are intended as debugging aids only.  There is no 
> need for them to be complete, they only need to include info we need for 
> debugging.  Since we never try to process them, we would never notice if 
> they were incomplete.
> As for completing them, that is a potential problem.  An FSF policy, 
> intended to prevent people from subverting the GPL, prevents us from 
> emitting debug/intermediate files that could be used by others to use 
> proprietary code with gcc without linking to gcc.  This is an 
> inconvenience, but it is current FSF policy so we must respect it.
> -- 
> Jim Wilson, GNU Tools Support,

Thanks for the response.  I do not need a complete AST, actually as far as I can tell the parameter ordering
issue may be the only thing stopping a rigorous static analysis tool ( with accurate data flow analysis).  
The additional code to get proper ordering is literally one line.   

A tool like this would be useful(as you are already aware of, I am sure), because you could automatically
perform static analysis checks, quickly, easily, and with detail every time you recompiled
your software.  The beauty of using gcc's functional(in terms of static analysis, which could be achieved
by adding the one line to permit proper parameter ordering) AST, is that it would allow instantly every 
piece of software compiled with gcc to go through this static analysis.  A free piece of software like this
would be of great use to all developers(while my software may not reach these lofty goals, the concept

I actually knew that the developers of gcc followed this intentionally incomplete policy, but it seemed like
this might have been an oversight since it was such an easy fix.

Thanks for you time,
Dan DaCosta

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