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: [RFT] PR19154: New AVR bit extraction pattern


> Mind gone blank -what are the "C" default promotion  rules as used by
> gcc when extending an "UNSIGNED char" into a calculation whose result
> will be signed int?

I believe it promotes both operands to the signed rank of the larger operand
or int which ever is larger, if smaller; and then if either is unsigned,
converts the other to unsigned as well (although technically need not
literally, if an alternative strategy yields equivalent effective results)




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