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] 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.


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