Re: pointer casts
- From: Owen Taylor <otaylor redhat com>
- To: "Dan Maas" <dmaas dcine com>
- Cc: "Daniel Egger" <degger fhm edu>, "GTK developers mailinglist" <gtk-devel-list gnome org>
- Subject: Re: pointer casts
- Date: Wed, 13 Mar 2002 14:27:07 -0500 (EST)
"Dan Maas" <dmaas dcine com> writes:
> > > GCC has a non-standard extension that allows implicit casts
> > > betweeen (void *) and any function pointers.
> >
> > "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."
>
> Violations of this rule could show up as a problem on architectures where
> function pointers are "special," e.g. IA-64 and PPC64. Is GTK working on
> these arches?
GTK+-2.0 has had some testing on IA-64... it certainly compiles and
the tools used in compilation work.
As far as I understand, while function pointers on IA-64 don't point
directly to the code address (they point to a "function descriptor"),
they still are 64-bits and should be fine to store temporarily in a
void *.
No idea about PPC64, but my guess is that any architecture that broke
the size equivalence of function and normal pointers would be "exotic"
enough to cause problems for a lot of software.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]