• 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: Variable evaluating improperly
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Variable evaluating improperly


  • Subject: Re: Variable evaluating improperly
  • From: Andreas Grosam <email@hidden>
  • Date: Sat, 04 May 2013 10:17:17 +0200

On 30.04.2013, at 01:54, Thomas Wetmore wrote:

> Compilers often optimize flow of control statements in non-obvious ways (especially if the conditional expression is a compile time constant as it in your case). This can lead to misleading or even impossible seeming representations in debugger windows. Insert a printf statement to see if you really get into the then clause. Of course, this might also completely change any optimization rearrangements. All very Heisenbergian.
>
> Tom

DGProduct is certainly not a compile-time constant, otherwise the debugger wouldn't have a symbol reference for DGProduct. In other words, compile-time constants do not have a location in memory where its value is stored, that is they do not have an address.

Btw: sometimes we might get confused by a linker error  about a "undefined symbol" from a compile-time constant. In fact there is no symbol for compile-time constants. In that case, your code is probably requiring the address (or a pointer or a C++ reference) of that constant, but it doesn't exist.  ;)


 _______________________________________________
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

  • Prev by Date: How To Abort the Run Build Scheme from a Pre-Action Script
  • Next by Date: Xcode vs. Boost
  • Previous by thread: How To Abort the Run Build Scheme from a Pre-Action Script
  • Next by thread: Xcode vs. Boost
  • Index(es):
    • Date
    • Thread