This is the mail archive of the
mailing list for the GCC project.
Re: Help with format checking for accepting parameters equivalent to "tree"
> From: "Joseph S. Myers" <email@example.com>
> On Thu, 19 Jun 2003, Kaveh R. Ghazi wrote:
> > The first thought is I'm registering the wrong type, in the sense that
> > I shouldn't register "tree" but instead I should register a "union
> > tree_node *", but I can't figure out how to get the "type" out of an
> You should register "union tree_node": the tables separately store the
> target type and the number of levels of indirection.
So can I assume you're confirming that if I do this the format code
will handle the four cases I included in my testcase? If so, great.
Regarding levels of indirection, I am aware of the "pointer_count"
field, if that's what you mean.
What I can't figure out is how to obtain a "TREE_TYPE" from the result
of calling maybe_get_identifier ("tree_node") that is suitable for
stuffing into the format data table. I'm sure it's just a couple of
lines of tree twiddling, but I can't figure out the appropriate magic
Can you shed some light on that?
Kaveh R. Ghazi firstname.lastname@example.org