This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Questions about modifing AST.
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).
>
> 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.