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] |
Ping. ---------- Forwarded message ---------- From: Andrew Pinski <pinskia@gmail.com> Date: Thu, Apr 16, 2009 at 10:40 AM Subject: [PATCH] Fix C++/39365 ++ operator with volatile bool increments To: GCC Patches <gcc-patches@gcc.gnu.org> Hi, ÂThe problem here is that same_type_p will return false if the type is a volatile bool when we are checking if the type is a bool type. This fixes the problem by just checking the type's code as the only bool types are BOOLEAN_TYPE. and BOOLEAN_TYPEs are always considered the bool type in C++. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. Thanks, Andrew Pinski ChangeLog: * typeck.c (cp_build_unary_op): Check TREE_CODE for bools instead of using same_type_p. * g++.dg/expr/bool3.C: New testcase. * g++.dg/expr/bool4.C: New testcase.
Attachment:
fixbool.diff.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |