C++ PATCH: PR 30274

Mark Mitchell mark@codesourcery.com
Mon Mar 12 15:32:00 GMT 2007


Andrew Pinski wrote:
> On 3/10/07, Mark Mitchell <mark@codesourcery.com> wrote:
>>
>> This patch fixes PR c++/30274, a P1 regression in 4.2.  This PR
>> concerned a mishandling of boolean bitfields; it was possible for them
>> to end up with the values other than zero and one, as a result of
>> increment operators.  While fixing that, I noticed several related
>> problems:
>>         /* Forbid using -- on `bool'.  */
>> -       if (same_type_p (TREE_TYPE (arg), boolean_type_node))
>> +       if (same_type_p (declared_type, boolean_type_node))
> 
> I noticed you also checked in this part instead of "declared_type ==
> boolean_type_node" on the 4.2 branch where it was before there in 4.2
> branch as "TREE_TYPE (arg) == boolean_type_node".  This change was to
> fix PR 29295.  Could you back port to the 4.2 branch, the testcases
> for that bug?  This was also related:
> 
> * we were allowing decrements of boolean bitfields, which is not
> permitted by the standard

Would you happen to have time to backport the tests?  Or, point me at
them by name?  I agree that we should do this, but I'm hoping you can
save me a few minutes on it.

Thanks,

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713



More information about the Gcc-patches mailing list