This is the mail archive of the
mailing list for the GCC project.
Re: tree dump system and scopes
- From: James E Wilson <wilson at specifixinc dot com>
- To: Tiago Stein <tiago at lisha dot ufsc dot br>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 16 Sep 2004 12:46:36 -0700
- Subject: Re: tree dump system and scopes
- References: <firstname.lastname@example.org>
Tiago Stein wrote:
need to be able to identify when a class (record) is inside any special
If you have trees, then the TYPE_CONTEXT field of a type, and the
DECL_CONTEXT field of a decl, contains a pointer to the containing
object or type.
There are some helper functions that you might find useful. See for
instance get_containing_scope, decl_function_context, and decl_type_context.
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com