From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4211 invoked by alias); 12 Nov 2012 05:04:17 -0000 Received: (qmail 4201 invoked by uid 22791); 12 Nov 2012 05:04:17 -0000 X-SWARE-Spam-Status: No, hits=-7.1 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 12 Nov 2012 05:04:12 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qAC54BBQ020983 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 12 Nov 2012 00:04:11 -0500 Received: from [10.3.113.62] (ovpn-113-62.phx2.redhat.com [10.3.113.62]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qAC54ADC019192; Mon, 12 Nov 2012 00:04:10 -0500 Message-ID: <50A08349.4070101@redhat.com> Date: Mon, 12 Nov 2012 05:04:00 -0000 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121029 Thunderbird/16.0.2 MIME-Version: 1.0 To: Sriraman Tallam CC: David Li , "H.J. Lu" , gcc-patches List , Jan Hubicka , Diego Novillo Subject: Re: User directed Function Multiversioning via Function Overloading (issue5752064) References: <506F27AF.3070805@redhat.com> <50816D63.3020908@google.com> <20121026155447.GA4348@atrey.karlin.mff.cuni.cz> <50902624.3020705@redhat.com> <50912F66.3030707@redhat.com> <50993222.3010609@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-11/txt/msg00871.txt.bz2 On 11/09/2012 08:33 PM, Sriraman Tallam wrote: > + /* Skip calling decls_match for versioned functions. */ > + if (DECL_FUNCTION_VERSIONED (fn) > + && DECL_FUNCTION_VERSIONED (TREE_PURPOSE (match))) > + continue; > + if (!decls_match (fn, TREE_PURPOSE (match))) > + break; This seems like it would allow multiple versioned functions from different namespaces; I want to allow mismatches only if they are versions of the same function. I was thinking for (match = TREE_CHAIN (matches); match; match = TREE_CHAIN (match)) if (!decls_match (fn, TREE_PURPOSE (match)) && !targetm.target_option.function_versions (fn, TREE_PURPOSE (match))) break; > + error_at (input_location, "Call/Pointer to multiversioned function" > + " without a default cannot be dispatched"); Let's just say "use of multiversioned function without a default". Jason