This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR middle-end/17793
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: jason at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 19 Oct 04 22:13:28 EDT
- Subject: Re: [PATCH] Fix PR middle-end/17793
Perhaps framing the distinction in terms of objects would help.
NOP_EXPR creates a new object with the same value, whereas
VIEW_CONVERT_EXPR accesses the same object as a different type. Do
you agree with that formulation?
No because the operand of VIEW_CONVERT_EXPR isn't necessarily an object:
it might also be a value. For example, you can have a VIEW_CONVERT_EXPR
whose operand is a PLUS_EXPR.
So both are operations that take an expression of one type and produce a
result ("value") of a different type. The difference is that NOP_EXPR's
result is numerically equal to that of its input while VIEW_CONVERT_EXPR's
result has the same bit pattern as its input, with whatever effect that has
on the meaning ("value") assigned to those bits.