• 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: Finding typecasts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding typecasts


  • Subject: Re: Finding typecasts
  • From: Dan White <email@hidden>
  • Date: Tue, 18 Aug 2009 17:23:11 -0400

Depends how he did it.

Did he cast ?

int foo = (int)(pointer) ;

or did he just "do it" implicitly ?

int foo = pointer + 1 ?

Strikes me that it would be very tough to automate finding either of those.
You are going to have to examine every instance of every pointer to isolate arithmetic operations.


The flexibility of C is definitely a two-edged sword (ouchies!)

On Aug 18, 2009, at 5:09 PM, Mark Wagner wrote:

How can I find every line of a C program where a pointer is cast to an
integer, or vice-versa?  I've got a library where the original author
treated pointers and integers as being the same thing, and I'm trying
to sort it out.

Thanks,
Mark Wagner
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Finding typecasts
      • From: Quincey Morris <email@hidden>
    • Re: Finding typecasts
      • From: "Sean McBride" <email@hidden>
References: 
 >Finding typecasts (From: Mark Wagner <email@hidden>)

  • Prev by Date: Finding typecasts
  • Next by Date: Re: Finding typecasts
  • Previous by thread: Finding typecasts
  • Next by thread: Re: Finding typecasts
  • Index(es):
    • Date
    • Thread