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

Re: shared text, shared libs again



On Fri, 19 Jun 1998, Michael Schwingen wrote:

> On Thu, Jun 18, 1998 at 03:06:00AM -0700, Howard Chu wrote:

> > My current thought here is to make the "pointer to function" type an
> > 8-byte type, so that both the function address and its a4 pointer may
> > be passed along. I believe this will work transparently enough without
> > breaking a lot of code.

> Hm. That would mean that a pointer to function would have a different size
> than other pointers - is this allowed by ANSI?

Yes.  ISO 6.3.4 covers allowed pointer conversions; for function pointers,
the only allowed conversion is to a pointer to a function of another type,
and even then, the only thing guaranteed about the resulting pointer is
that if cast back to its original type, it will compare equal to the
original pointer.

> What about void*, which should be able to be cast to any pointer?

Not any pointer.  According to 6.2.2.3, "A pointer to void may be converted
to or from a pointer to any incomplete or object type."

						-sbigham