This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
What is TYPE_STUB_DECL?
- To: gcc at gcc dot gnu dot org
- Subject: What is TYPE_STUB_DECL?
- From: Tim Josling <tej at melbpc dot org dot au>
- Date: Sat, 27 Jan 2001 08:36:33 +1100
- Organization: Melbourne PC User Group
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