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: [tree-ssa] More CCP fixes [patch]


1) its true type (3 bit unsigned int) in the current type field
That is only its true type when used as an lvalue.  When used as an
rvalue, its true type is whatever it was declared to be (int, unsigned
int, etc. -- modulo the fact that "int" can mean "unsigned int"
in a bitfield.)

A reference to a bit-field in an rvalue context should be treated as
implicitly containing the right sign extensions.  That means that the
tree node used to convert from (say) "unsigned int" to "signed int"
should not be a NOP_EXPR -- you're not supposed to have generate code
for a NOP_EXPR.

--
Mark Mitchell                mark@codesourcery.com
CodeSourcery, LLC            http://www.codesourcery.com


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