c++ - What could be the cause of this if condition getting skipped even the condition inside is True? -


i debugging c++ project (a plugin adobe indesign) bug on osx 10.9.5 using xcode 4.6.2. have encountered strange problem in following code, if statement in following code getting skipped when condition inside valid/true. when control reaches if statement value of insertsinglepageelement 1, insertsinglepageelement bool16 variable. must return true, still code inside if block getting skipped.

also, xcode allows see corresponding assembly code? if yes how?

bool16 insertsinglepageelement = ktrue; ... //code ... if(insertsinglepageelement == ktrue)         {             msgs = insertpageelementtopage(pe, pagedata->grid, &pagename, pagedata->presentationid, idpageelementmap, true);          } else {             //else block 

enter image description here

enter image description here

above images show value of variable , debugger showing skipping of code in second image 1 step first one.

the reason of problem true block xcode4.6.2 (using apple llvm 4.2) showing true not true. after turning optimization on, x-code started showing false.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -