public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* problem with function trees
@ 2001-09-22 17:10 Dave Morse
  2001-09-22 22:26 ` Diego Novillo
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Morse @ 2001-09-22 17:10 UTC (permalink / raw)
  To: gcc

[repost]

I'm trying to figure out the types of function arguments, but bonking.
Please help me understand what is going on here.  

  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.

Hrmph.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: problem with function trees
  2001-09-22 17:10 problem with function trees Dave Morse
@ 2001-09-22 22:26 ` Diego Novillo
  0 siblings, 0 replies; 3+ messages in thread
From: Diego Novillo @ 2001-09-22 22:26 UTC (permalink / raw)
  To: Dave Morse; +Cc: gcc

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* problem with function trees
@ 2001-09-21 15:18 Dave Morse
  0 siblings, 0 replies; 3+ messages in thread
From: Dave Morse @ 2001-09-21 15:18 UTC (permalink / raw)
  To: gcc

I'm trying to figure out the types of function arguments, but bonking.
Please help me understand what is going on here.  

  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.

Hrmph.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-09-22 22:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-22 17:10 problem with function trees Dave Morse
2001-09-22 22:26 ` Diego Novillo
  -- strict thread matches above, loose matches on Subject: below --
2001-09-21 15:18 Dave Morse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).