Re: pointer casts

Daniel Egger <degger fhm edu> writes:

> Am Mit, 2002-03-13 um 16.09 schrieb Owen Taylor:
> > GCC has a non-standard extension that allows implicit casts betweeen (void *)
> > and any function pointers.
> Funny I was just reading relevant part of the C9x rationale while your
> mail was comming in and it explicitely says:
> "Even with an explicit cast, it is invalid to convert a function pointer
> to an object pointer or a pointer to void, or vice versa."
> Thus if Gtk+/Glib is doing that we might want to consider to change
> that.

It's frozen into the API at this point, so, while I certainly intend
to try and keep us from avoid introducing any more copies of this bug,
fixing would be a real problem at this point, so probably should wait
until someone shows up with a mainstream system on which it causes

[ We'd have to ENABLE_BROKEN g_signal_handlers_disconnect_by_func() etc,
  and introduce some non broken equivalents ]


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