This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Rename tree_ann to tree_ann_t
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Steven Bosscher <stevenb at suse dot de>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Daniel Berlin <dberlin at dberlin dot org>, Zack Weinberg <zack at codesourcery dot com>, Nathan Sidwell <nathan at codesourcery dot com>
- Date: Mon, 17 May 2004 18:14:35 -0400
- Subject: Re: Rename tree_ann to tree_ann_t
- Organization: Red Hat Canada
- References: <200405172204.i4HM4Xlm009919@speedy.slc.redhat.com>
On Mon, 2004-05-17 at 18:04, law@redhat.com wrote:
> In message <1084826556.3630.130.camel@localhost.localdomain>, Diego Novillo wri
> tes:
> >I would like to have a generic mechanism for this. We have an
> >annotation scheme that sort of works but it's dynamically checked (See
> >var_ann_d, stmt_ann_d, ssa_name_ann_d in tree-flow.h). Do you have any
> >thoughts about this?
> And there's absolutely no reason to do this... The set of annotations we
> attach to nodes is completely determined by the type of the node the
> annotation is attached to.
>
No. All the nodes we attach annotations to are of type 'tree'. The
checking is still dynamic.
We could lose the tree_ann_common_d type, but then we would have to have
a 'void *' field in tree_common. We now have a pointer to a union of
all the possible types, which is slightly better.
Diego.