This is the mail archive of the 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]

[PTR-PLUS] Fix most of the C++ testcases and add checking earlier

  The C++ front-end needs more changes for POINTER_PLUS_EXPR, they are all 
minor, most are s/PLUS_EXPR/POINTER_PLUS_EXPR, others are changeing to use 
sizetype instead of ptrdiff_type_node.  After this patch, we get down to 2 
failures with the C++ testsuite (I have not yet looked at the libstdc++ 
This patch also adds one more checking to build2_stat so we catch an 
invalid POINTER_PLUS_EXPR earlier on instead during the verify cfg check, 
this helps debugging the issues, if people think the build2 check is too 
expensive, I can wrap it around with a #ifdef ENABLE_CHECKING.

Note most the places where I am replacing PLUS_EXPR to POINTER_PLUS_EXPR, 
the C++ front-end was already playing fast and lose with types of the 

Committed to the branch after a bootstrap/test on i686-linux-gnu with no 

Andrew Pinski


        * tree.c (build2_stat): Check to make sure the
        second operand is compatiable with sizetype.

        * typeck.c (get_member_function_from_ptrfunc):
        Change over to using POINTER_PLUS_EXPR and convert
        the second operand to sizetype.
        * typecheck2.c (build_m_component_ref): Likewise.
        * rtti.c (build_headof): Use sizetype instead of

Attachment: fixmostc++.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]