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: More on VIEW_CONVERT_EXPR


Zack Weinberg wrote:

Mark Mitchell <mark@codesourcery.com> writes:



Richard Kenner wrote:



I see VIEW_CONVERT_EXPR of type T applied to object X as meaning
"treat object X as if it were type T".  That's why I see it more as
a code 'r'.



The documentation says that this is like "*(type2 *)&X" in C.

So, can it just be represented that way, on exit from the Ada front end?



Uh, *(type2 *)&X doesn't work in the general case due to the aliasing
rules, whereas I get the impression V_C_E is expected to work always.


Good point!

I'm not sure if there's a way around that. I was just trying to think of a way to keep this on the front-end's side of the fence.

--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com


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