This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix bogus function cast warning for functions with common arg subset
- From: David Malcolm <dmalcolm at redhat dot com>
- To: Siddhesh Poyarekar <siddhesh at sourceware dot org>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 23 Feb 2018 10:50:43 -0500
- Subject: Re: [PATCH] Fix bogus function cast warning for functions with common arg subset
- Authentication-results: sourceware.org; auth=none
- References: <20180223034045.26231-1-siddhesh@sourceware.org>
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