C++ PATCH: PR 30274

Andrew Pinski pinskia@gmail.com
Sun Mar 11 04:28:00 GMT 2007


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


Thanks,
Andrew Pinski



More information about the Gcc-patches mailing list