Re: Cannot understand the following codes
- From: Ben C <spamspam@xxxxxxxxx>
- Date: 29 Mar 2006 20:14:11 GMT
On 2006-03-29, Joe Wright <joewwright@xxxxxxxxxxx> wrote:
Ben C wrote:
[..]
I had assumed void * was good for anything. But it's only good for data,
not functions.
I suppose on some machines functions might have a completely different
address space, be a completely different size etc., and the standard is
allowing for that...
Pedantically void pointers and function pointers are not compatible.
But is a less pedantic world it might work.. if you change your line
int x = (*r)(3);
to
int x = (r)(3); or even
int x = r(3);
Isn't this a different issue? I don't know what the standard says about
r(3), although it usually works.
.
- Follow-Ups:
- Re: Cannot understand the following codes
- From: Arthur J. O'Dwyer
- Re: Cannot understand the following codes
- References:
- Cannot understand the following codes
- From: gpsabove
- Re: Cannot understand the following codes
- From: Alf P. Steinbach
- Re: Cannot understand the following codes
- From: Ben C
- Re: Cannot understand the following codes
- From: Alf P. Steinbach
- Re: Cannot understand the following codes
- From: Ben C
- Re: Cannot understand the following codes
- From: Joe Wright
- Cannot understand the following codes
- Prev by Date: Re: Cannot understand the following codes
- Next by Date: Re: Yacc = Bison???
- Previous by thread: Re: Cannot understand the following codes
- Next by thread: Re: Cannot understand the following codes
- Index(es):
Relevant Pages
|