This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Need GC help
- From: Richard Henderson <rth at redhat dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: apinski at apple dot com, gcc at gcc dot gnu dot org
- Date: Mon, 3 Nov 2003 14:39:37 -0800
- Subject: Re: Need GC help
- References: <10311032140.AA24055@vlsi1.ultra.nyu.edu>
On Mon, Nov 03, 2003 at 04:40:41PM -0500, Richard Kenner wrote:
> > Look at ada/ada-tree.h at the TYPE_DIGITS_VALUE macro.
> > How do I tell GC that that isn't a pointer?
>
> You do not, use a struct for the long, just like all other front-ends.
>
> Sorry, I don't follow you. Can you point me to an example?
struct lang_type GTY(())
{
union {
union lang_tree_node
GTY((desc ("TREE_CODE (&%h.generic) == GNAT_LOOP_ID"),
tag ("0"))) t;
long GTY((tag ("1"))) digits_value;
} GTY ((desc ("<condition that's true when digits_value is used>"))) u;
};
#define TYPE_CI_CO_LIST(NODE) \
(&TYPE_LANG_SPECIFIC (FUNCTION_TYPE_CHECK (NODE))->u.t.generic)
...
#define TYPE_DIGITS_VALUE(NODE) \
(TYPE_LANG_SPECIFIC (INTEGER_TYPE_CHECK (NODE))->u.digits_value)
r~