This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Names for structs from RECORD_TYPE trees


On Sun, Sep 09, 2001 at 10:49:07PM -0700, David Morse wrote:
> 
> Can anyone think of a way to fetch the name of a struct from its tree
> node?  Given a node for a structure, with TREE_CODE (t) == RECORD_TYPE, I
> find that DECL_NAME (TYPE_NAME (t)) returns NULL_TREE.  

TYPE_NAME (t) is an IDENTIFIER_NODE.  Try
IDENTIFIER_POINTER (TYPE_NAME (t)).

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]