This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: problem with function trees
- To: Dave Morse <dm at bomberlan dot net>
- Subject: Re: problem with function trees
- From: Diego Novillo <dnovillo at redhat dot com>
- Date: Sun, 23 Sep 2001 01:26:18 -0400
- Cc: gcc at gcc dot gnu dot org
- Organization: Red Hat Canada
- References: <15277.10335.620682.411294@ork-intranet.bomberlan.net>
On Sat, 22 Sep 2001, Dave Morse wrote:
> void set_nchicken( int n );
>
> For the above function, I have a tree, t, with code FUNCTION_DECL.
> TREE_VALUE (TYPE_ARG_TYPES (t)) returns a tree which should be the type of
> the first argument. TYPE_NAME of that returns null. I was expecting a
> TYPE_DECL who describes the name of the type.
>
t is a FUNCTION_DECL. TYPE_ARG_TYPES (t) is, therefore,
meaningless. You want TYPE_ARG_TYPES (TREE_TYPE (t)). See
the documentation in tree.{h,def}.
Diego.