Re: Some pointer quiestions again
- From: "Robert Gamble" <rgamble99@xxxxxxxxx>
- Date: 31 May 2005 12:51:07 -0700
Mac wrote:
> On Tue, 31 May 2005 17:45:08 +0000, Jens.Toerring wrote:
>
> [snip]
>
> > [...] requiring that all pointer types
> > can be converted to and from a void pointer [...]
>
> Isn't this supposed to be all _object_ pointer types or something like
> that? What I am getting at is that ISTR that you cannot store a function
> pointer in a void pointer.
Correct. A function pointer can be converted to a void pointer [1] but
cannot portably be converted back again. A function pointer can be
converted to a function pointer of another type and back again though.
[1] I am not sure that a function pointer can even be converted to a
void pointer reliably, if not then there would appear to be no portable
way to print the value of a function pointer. If anyone can point to a
spot in the Standard that clarifies this, feel free.
Rob Gamble
.
- References:
- Some pointer quiestions again
- From: junky_fellow
- Re: Some pointer quiestions again
- From: Jens . Toerring
- Re: Some pointer quiestions again
- From: Mac
- Some pointer quiestions again
- Prev by Date: message buffering for logs, sprintf, etc...
- Next by Date: max size for printf() format conversion?
- Previous by thread: Re: Some pointer quiestions again
- Next by thread: How to interact with Oracle, MS-SQL and Sybase databases using C Language
- Index(es):
Relevant Pages
|