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]

[PATCH]: PR29066 ptrmemfunc_vbit_in_delta is broken


Hi,

In build_binary_op, the NE_EXPR/EQ_EXPR comparison of a ptrmemfunc type to a
null_ptr_cst only looks at the pfn. This breaks ptrmemfunc_vbit_in_delta 
targets as it is possible to have a pfn of 0. In the case where 
ptrmemfunc type is compared to another ptrmemfunc type, the generated 
expression of:

 (op0.pfn == op1.pfn
  && (!op0.pfn || op0.delta == op1.delta))

breaks as well.

2006-11-02  Ryan Mansfield  <rmansfield@qnx.com>

        PR c++/29066
        * typeck.c (build_binary_op):  Fix pointer to member function
        comparison for ptrmemfunc_vbit_in_delta targets.
        * testsuite/g++.dg/other/pr29066.c: New.

Any feedback is appreciated.

Regards,

Ryan Mansfield

Attachment: pr29066.patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]