From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31890 invoked by alias); 23 Feb 2018 15:50:48 -0000 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 Received: (qmail 31795 invoked by uid 89); 23 Feb 2018 15:50:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 23 Feb 2018 15:50:46 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D03AB2DA99D; Fri, 23 Feb 2018 15:50:44 +0000 (UTC) Received: from ovpn-117-5.phx2.redhat.com (ovpn-117-5.phx2.redhat.com [10.3.117.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6585C5D6A2; Fri, 23 Feb 2018 15:50:44 +0000 (UTC) Message-ID: <1519401043.2913.34.camel@redhat.com> Subject: Re: [PATCH] Fix bogus function cast warning for functions with common arg subset From: David Malcolm To: Siddhesh Poyarekar , gcc-patches@gcc.gnu.org Date: Fri, 23 Feb 2018 15:50:00 -0000 In-Reply-To: <20180223034045.26231-1-siddhesh@sourceware.org> References: <20180223034045.26231-1-siddhesh@sourceware.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-02/txt/msg01328.txt.bz2 On Fri, 2018-02-23 at 09:10 +0530, Siddhesh Poyarekar wrote: > Libraries like gtk/glib[1] and python[2] use functions with common > argument subsets to register callbacks. The working idea behind it > is > to have a flag in the structure (or some other pre-determined method) > that specifies how the callback is cast and called. > > Fix this by not throwing a warning when functions with different > argument list lengths (of M and N where M < N) have compatible > argument types for the first M arguments. Do we have a PR open for this yet? I believe this is an example of where this bit (for the Python case): https://github.com/imageworks/OpenColorIO/pull/518 [...snip...] Dave