[REPOST] [PATCH] Avoid excessive function type casts with splay-trees

Bernd Edlinger bernd.edlinger@hotmail.de
Thu May 3 20:13:00 GMT 2018


Hi,

this is basically the same patch I posted a few months ago,
with a few formatting nits by Jakub fixed.

Bootstrapped and reg-tested again with current trunk.

Is it OK for trunk?


Bernd.

On 12/15/17 11:44, Bernd Edlinger wrote:
> Hi,
> 
> when working on the -Wcast-function-type patch I noticed some rather
> ugly and non-portable function type casts that are necessary to accomplish
> some actually very simple tasks.
> 
> Often functions taking pointer arguments are called with a different signature
> taking uintptr_t arguments, which is IMHO not really safe to do...
> 
> The attached patch adds a context argument to the callback functions but
> keeps the existing interface as far as possible.
> 
> 
> Bootstrapped and reg-tested on x86_64-pc-linux-gnu.
> Is it OK for trunk?
> 
> 
> Thanks
> Bernd.
> 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: changelog-splay-tree.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180503/e72cb504/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-splay-tree.diff
Type: text/x-patch
Size: 15051 bytes
Desc: patch-splay-tree.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180503/e72cb504/attachment.bin>


More information about the Gcc-patches mailing list