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: Questions about modifing AST.


On Sun, 27 Oct 2002 at 20:23, Fergus Henderson wrote:
> On 28-Oct-2002, Eric Tang <tytang@cse.cuhk.edu.hk> wrote:
> > > 
> > > On 27-Oct-2002, Eric Tang <tytang@cse.cuhk.edu.hk> wrote:
> > > > 	i want to convert floating point to fixed point arithmetics
> > > > 	in compiler level.
> > > If you want to do this, it's better to write a pass which operates
> > > directly on GCC's AST representation, rather than trying to read
> > > in the AST from the dump file (which won't work, IIUC, because the dump
> > > file is deliberately incomplete).

   How incomplete?  From a cursory look at tree-dump.c, it seemed trivial to add more information to the AST dump.  Is there some bound on what one could easily add to the AST dump? What is it?  Thanx in advance!

dan dacosta  

> > 	
> > 	If i want to operate directly on GCC's AST, i need to modify
> > 	the source code of gcc??
> 
> Yes.
> 
> >	since i don't want to modify the
> > 	gcc compiler and want to do it seperately. So it is more 
> > 	portable?!
> 
> GCC has been deliberately designed so that that approach won't work.
> 
> -- 
> Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
> The University of Melbourne         |  of excellence is a lethal habit"
> WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
> 
> 


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