Re: sizeof a function

2010-11-09 Thread Greg Parker
On Nov 9, 2010, at 2:07 AM, Kyle Sluder wrote: > On Mon, Nov 8, 2010 at 9:06 AM, Gerriet M. Denkmann > wrote: >> typedef char *(*my_type)(const char *, int); >> my_type some = index; >> fprintf(stderr,"sizeof(index): %lu\n", sizeof(index)); >> fprintf(stderr,"sizeof(some): %lu\n", sizeof(some)); >

Re: sizeof a function

2010-11-09 Thread Kyle Sluder
On Mon, Nov 8, 2010 at 9:06 AM, Gerriet M. Denkmann wrote: > typedef char *(*my_type)(const char *, int); > my_type some = index; > fprintf(stderr,"sizeof(index): %lu\n", sizeof(index)); > fprintf(stderr,"sizeof(some): %lu\n", sizeof(some)); 1. This is not a Cocoa question. 2. sizeof of an expres

sizeof a function

2010-11-09 Thread Gerriet M. Denkmann
These lines: typedef char *(*my_type)(const char *, int); my_type some = index; fprintf(stderr,"sizeof(index): %lu\n", sizeof(index)); fprintf(stderr,"sizeof(some): %lu\n", sizeof(some)); produce: sizeof(index): 1 sizeof(some): 8 This is x86_64 so the pointer-size should be 8 bytes. But why is