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


    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.

Correct.  But it's not just aliasing.  It's alignment too.  You can have
a packed record that contains another record at a position that's not at
its natural alignment and then do a V_C_E of that field.  This may sound
obscure, but it happens in real Ada code quite a lot of the time.


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