problem with function trees
Diego Novillo
dnovillo@redhat.com
Sat Sep 22 22:26:00 GMT 2001
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.
More information about the Gcc
mailing list