This is the mail archive of the gcc-bugs@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: middle-end/9725: Invalid dependency determination


Which is almost as bad as the memcpy approach - the thing to be created
that way (i.e. through a macro) can't possibly be an lvalue when
supposed to access more than something contained within a single
byte...
I realized a supposedly legal (and working) approach anyway (though I
continue to believe that the original bitfield approach is legal, too -
just that it doesn't work with gcc...): Instead of having a union of
aliased type and aliasing structure, add a flexible array of the aliased
type to the end of the aliasing structure.

>>> Wolfgang Bangerth <bangerth at ticam dot utexas dot edu> 19.02.03 18:14:43
>>>

> of not using this logic - how do I access sub-fields of a built-in
type

Go through a char* which can alias everything. This special case exists

for this particular purpose: accessing single bytes in other types.

W.

-------------------------------------------------------------------------
Wolfgang Bangerth             email:           
bangerth at ticam dot utexas dot edu 
                              www:
http://www.ticam.utexas.edu/~bangerth/ 



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