[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Incompatible function types

From: David Kastrup
Subject: Re: Incompatible function types
Date: Sun, 12 Aug 2018 09:34:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Dan Eble <address@hidden> writes:

> g++ 8 is spamming my build log with messages like this:
>     /root/lilypond-src/lily/include/smobs.hh:228:37:
>     warning: cast between incompatible function types
>     from 'scm_unused_struct* (*)(SCM, SCM, SCM, SCM)’
>     {aka 'scm_unused_struct* (*)(scm_unused_struct*,
>     scm_unused_struct*, scm_unused_struct*, scm_unused_struct*)’}
>     to 'scm_t_subr' {aka 'scm_unused_struct* (*)()’}
>     [-Wcast-function-type]
>                          (scm_t_subr)smob_trampoline<PMF>,
>                                      ^~~~~~~~~~~~~~~~~~~~
> The issue seems to be the differing number of parameters.
> Do you see anything worth doing about it at this time?  I could possibly 
> bring myself to ignore it, if you would recommend that.

I think that the cast is there in order to match a function's argument
type.  Clearly it's the fault of the Guile function in question to
receive arguments of a type that's different from how it calls it.

So we probably need to crank out a reinterpret_cast here.

David Kastrup

reply via email to

[Prev in Thread] Current Thread [Next in Thread]