• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: sizeof a function
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sizeof a function


  • Subject: Re: sizeof a function
  • From: Kyle Sluder <email@hidden>
  • Date: Tue, 9 Nov 2010 02:07:47 -0800

On Mon, Nov 8, 2010 at 9:06 AM, Gerriet M. Denkmann <email@hidden>
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 expression of function type is illegal according to
constraint 1 of section 6.5.3.4 of C99:
http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: sizeof a function
      • From: Greg Parker <email@hidden>
References: 
 >sizeof a function (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: Re: NSTextFieldCell multi-line
  • Next by Date: Populating NSPopUpbuttonCell in document-based Core Data App
  • Previous by thread: sizeof a function
  • Next by thread: Re: sizeof a function
  • Index(es):
    • Date
    • Thread