2009/11/28 Richard Guenther :
> On Sat, Nov 28, 2009 at 11:43 PM, Shaun Jackman wrote:
>> When assigning a bool to a single bit of a bitfield located in the
>> bit-addressable region of memory, better code is produced by
>> if (flag)
>> bitfield.bit = true;
>> else
>>
On Sat, Nov 28, 2009 at 11:43 PM, Shaun Jackman wrote:
> When assigning a bool to a single bit of a bitfield located in the
> bit-addressable region of memory, better code is produced by
> if (flag)
> bitfield.bit = true;
> else
> bitfield.bit = false;
>
When assigning a bool to a single bit of a bitfield located in the
bit-addressable region of memory, better code is produced by
if (flag)
bitfield.bit = true;
else
bitfield.bit = false;
than
bitfield.bit = flag;
I've included a short test and