• 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: C local auto-initialized?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C local auto-initialized?


  • Subject: Re: C local auto-initialized?
  • From: Fritz Anderson <email@hidden>
  • Date: Thu, 20 Sep 2007 19:21:52 -0500

On Sep 20, 2007, at 6:11 PM, Chris Suter wrote:

On 21/09/2007, at 8:31 AM, Fritz Anderson wrote:

And it's there; hurray! It loads into register $f0; hurray!

But the value disappears at the instant something is added to the register containing it. Why?

What exactly is the garbage value? If the exponent is large and negative you'll get the behaviour you're seeing.

Greg Guerin:

All that's needed is a difference in magnitude that exceeds the precision
of a double, so that N+M is identical to N or M.

It's on the order of -2.0 . Decimal exponent of zero. The addend is 16.0.


Chris Suter:

Note that if you compile with all warnings enabled (which I do as a matter of course) and you have optimisations enabled, the compiler will warn you that you're using an uninitialised variable.

Yes, that is good. However, people seem to forget what I'm doing: I'm trying to teach how to debug something. I DON'T WANT TO AVOID THE BUG. And, if I'm debugging, there's no optimization. Besides, I'm writing for instructional purposes, teaching Xcode, and at the very beginning, I can't detour people away from instructional tasks to adjusting the development environment.


	— F

_______________________________________________
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: C local auto-initialized?
      • From: Steve Sisak <email@hidden>
    • Re: C local auto-initialized?
      • From: Laurence Harris <email@hidden>
    • Re: C local auto-initialized?
      • From: Chris Suter <email@hidden>
References: 
 >Re: C local auto-initialized? (From: Greg Guerin <email@hidden>)
 >Re: C local auto-initialized? (From: Fritz Anderson <email@hidden>)
 >Re: C local auto-initialized? (From: Chris Suter <email@hidden>)

  • Prev by Date: Re: C local auto-initialized?
  • Next by Date: Re: C local auto-initialized?
  • Previous by thread: Re: C local auto-initialized?
  • Next by thread: Re: C local auto-initialized?
  • Index(es):
    • Date
    • Thread