This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PCH] Fixup TYPE_SYMTAB_POINTER misuse
> Date: Thu, 14 Feb 2002 05:09:10 +0000
> Cc: gcc-patches@gcc.gnu.org
> Content-Disposition: inline
> User-Agent: Mutt/1.3.27i
> From: Neil Booth <neil@daikokuya.demon.co.uk>
>
> Geoff Keating wrote:-
>
> > + * tree.h (TYPE_SYMTAB_DIE): New macro.
> > + (struct die_struct): Predeclare.
> > + (struct tree_type): Add field symtab.die. Add a tag
> > + to the union type of field symtab.
>
> This part seems to be missing.
I noticed that right after I sent the mail; it did get committed, I'll
attach it below for your viewing pleasure :-).
Note that none of this stuff seems to be documented; a future patch
will provide internal documentation that at least explains which union
field is used when.
--
- Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>
===File ~/z3================================================
Index: tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.h,v
retrieving revision 1.306
retrieving revision 1.299.2.2
diff -p -r1.306 -r1.299.2.2
*** tree.h 2002/02/09 03:08:05 1.306
--- tree.h 2002/02/14 01:35:52 1.299.2.2
*************** struct tree_block
*** 949,954 ****
--- 949,955 ----
#define TYPE_PRECISION(NODE) (TYPE_CHECK (NODE)->type.precision)
#define TYPE_SYMTAB_ADDRESS(NODE) (TYPE_CHECK (NODE)->type.symtab.address)
#define TYPE_SYMTAB_POINTER(NODE) (TYPE_CHECK (NODE)->type.symtab.pointer)
+ #define TYPE_SYMTAB_DIE(NODE) (TYPE_CHECK (NODE)->type.symtab.die)
#define TYPE_NAME(NODE) (TYPE_CHECK (NODE)->type.name)
#define TYPE_NEXT_VARIANT(NODE) (TYPE_CHECK (NODE)->type.next_variant)
#define TYPE_MAIN_VARIANT(NODE) (TYPE_CHECK (NODE)->type.main_variant)
*************** struct tree_block
*** 1186,1191 ****
--- 1187,1194 ----
#define MAX_POINTER_DEPTH 2
#define VA_LIST_POINTER_DEPTH 3
+ struct die_struct;
+
struct tree_type
{
struct tree_common common;
*************** struct tree_type
*** 1218,1224 ****
unsigned int align;
tree pointer_to;
tree reference_to;
! union {int address; char *pointer; } symtab;
tree name;
tree minval;
tree maxval;
--- 1221,1231 ----
unsigned int align;
tree pointer_to;
tree reference_to;
! union tree_type_symtab {
! int address;
! char *pointer;
! struct die_struct *die;
! } symtab;
tree name;
tree minval;
tree maxval;
============================================================