[Top][All Lists]

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

Re: Selectively suppress -Wcast-function-type (issue 357770043 by addres

From: dak
Subject: Re: Selectively suppress -Wcast-function-type (issue 357770043 by address@hidden)
Date: Mon, 13 Aug 2018 23:41:43 -0700

On 2018/08/14 02:12:59, Dan Eble wrote:
Compile with -Wno-cast-function-type

Sorry for noticing this late in the game, but one thing worth noting
here is that in Guile 1.8 the comments would appear to indicate that we
are defining scm_t_subr ourselves in lily/include/lily-guile-macros.hh

/* For backward compatability with Guile 1.8 */
typedef SCM (*scm_t_subr) (GUILE_ELLIPSIS);

While I have my doubts that we could provide a definition that would
work better with regard to the warning (there are prototypes like

libguile/gsubr.c:scm_c_define_gsubr (const char *name, int req, int opt,
int rst, SCM (*fcn)())

so indeed scm_t_subr appears to be defined in line with what's used in
the headers and it's the cast that is the problem), that seems worth
pointing out.  Possibly

typedef void* scm_t_subr;

could perversely work.  I think I prefer disabling the warning.  So this
is more for completeness' sake than anything else.

reply via email to

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