lilypond-devel
[Top][All Lists]
Advanced

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

Selectively suppress -Wcast-function-type (issue 357770043 by address@hi


From: dak
Subject: Selectively suppress -Wcast-function-type (issue 357770043 by address@hidden)
Date: Mon, 13 Aug 2018 00:11:38 -0700

I'd use scm_func_cast<scm_t_blabla> (actual_func)
in order to mimic what reinterpret_cast does, but the implementation
looks awfully heavy-handed and GCC-8 specific.

Any chance that an implementation via a double cast (with something like
void * in between) will work?  Strictly speaking that's worse than
casting from one function pointer to another since function and data
pointers need not be the same size on segmented architectures, but lots
of code does stuff like that anyway.

Or we just disable that specific warning completely: casting from one
function pointer to another is "I mean it" territory.  It's part of the
Guile API and we cannot really expect people to circumvent it every
time.

https://codereview.appspot.com/357770043/



reply via email to

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