Re: pointer casts
- From: Owen Taylor <otaylor redhat com>
- To: Daniel Egger <degger fhm edu>
- Cc: Miroslaw Dobrzanski-Neumann <mne mosaic-ag com>, GTK developers mailinglist <gtk-devel-list gnome org>
- Subject: Re: pointer casts
- Date: Wed, 13 Mar 2002 14:29:23 -0500 (EST)
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
problems.
[ We'd have to ENABLE_BROKEN g_signal_handlers_disconnect_by_func() etc,
and introduce some non broken equivalents ]
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]