This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: stab info for const fields
- From: Andrew Haley <aph at redhat dot com>
- To: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Cc: zack at codesourcery dot com, gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Fri, 1 Nov 2002 11:55:14 +0000 (GMT)
- Subject: Re: Patch: stab info for const fields
- References: <10211011146.AA04250@vlsi1.ultra.nyu.edu>
Richard Kenner writes:
> - In the language-independent tree representation, whenever a tree
> with type A has an operand with type B, A not identical to B, the
> operand is implicitly converted to type A before the operation
> occurs.
>
> But what does that mean? That's the essence of the problem.
>
> Please go back to the originally-stated question: if a see a PLUS_EXPR and
> look at its type and the types of its operands, how do I know if that's
> a valid tree node in our IL? If the answer is "you look at the definition
> of the language it's written in", that's a serious problem in my view.
You seem to have smipped
Most of the time there is just one, well-defined, conversion
operation that makes sense in any such context. If there is none,
or if there could be multiple intended semantics, the tree is
ill-formed; the middle-end will abort if handed such a tree.
So the question becomes: "in what circumstances is there just one,
well-defined, conversion that makes sense?" If we properly define
those circumstances the problem is solved.
Andrew.