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]

What is TYPE_STUB_DECL?


If I do not populate TYPE_STUB_DECL in my COBOL compiler in
certain cirsumstances (in the type tree for record structures) my
compiler aborts in dbxout.c. This is due to the NULL value. 

It seems to be used for debugging information. But there is no
documenation on what it is, what it is for, or what it should
contain. Specifically in tree.h the macro is defined with no
comment provided. There is an enigmatic comment in c-decl.c as
follows:

  /* Create a fake NULL-named TYPE_DECL node whose TREE_TYPE will
be the
     tagged type we just added to the current binding level. 
This fake
     NULL-named TYPE_DECL node helps dwarfout.c to know when it
needs
     to output a representation of a tagged type, and it also
gives
     us a convenient place to record the "scope start" address
for the
     tagged type.  */

  TYPE_STUB_DECL (type) = pushdecl (build_decl (TYPE_DECL,
NULL_TREE, type));

Can anyone help? I have by trial and error and running debugging
sessions gotten it working but I don't really understand how :-(,

Tim Josling

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