This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: stab info for const fields


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]