From patchwork Fri Mar 29 23:10:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [C++] Use TYPE_PTR_P and VOID_TYPE_P more often X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 232497 Message-Id: <51561F51.5000803@oracle.com> To: Jason Merrill Cc: "gcc-patches@gcc.gnu.org" , Gabriel Dos Reis Date: Sat, 30 Mar 2013 00:10:09 +0100 From: Paolo Carlini List-Id: On 03/29/2013 09:03 PM, Jason Merrill wrote: > OK. Thanks. Earlier today I missed 2 more TYPE_PTRFN_P and a TYPE_REFFN_P: I'm applying as obvious the below, which just passed testing. Thanks again, Paolo. /////////////////// 2013-03-29 Paolo Carlini * call.c (build_op_call_1): Use TYPE_PTRFN_P and TYPE_REFFN_P. Index: call.c =================================================================== --- call.c (revision 197249) +++ call.c (working copy) @@ -4082,13 +4082,10 @@ build_op_call_1 (tree obj, vec **args tree fns = TREE_VALUE (convs); tree totype = TREE_TYPE (convs); - if ((TYPE_PTR_P (totype) - && TREE_CODE (TREE_TYPE (totype)) == FUNCTION_TYPE) + if (TYPE_PTRFN_P (totype) + || TYPE_REFFN_P (totype) || (TREE_CODE (totype) == REFERENCE_TYPE - && TREE_CODE (TREE_TYPE (totype)) == FUNCTION_TYPE) - || (TREE_CODE (totype) == REFERENCE_TYPE - && TYPE_PTR_P (TREE_TYPE (totype)) - && TREE_CODE (TREE_TYPE (TREE_TYPE (totype))) == FUNCTION_TYPE)) + && TYPE_PTRFN_P (TREE_TYPE (totype)))) for (; fns; fns = OVL_NEXT (fns)) { tree fn = OVL_CURRENT (fns);