This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFT] PR19154: New AVR bit extraction pattern
- From: Paul Schlie <schlie at comcast dot net>
- To: Andrew Hutchinson <andrewhutchinson at cox dot net>
- Cc: Roger Sayle <roger at eyesopen dot com>,<gcc-patches at gcc dot gnu dot org>
- Date: Mon, 14 Mar 2005 20:30:34 -0500
- Subject: 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)