I am currently doing sort in pset3, when I make and then run gdb on find to sort and see the sorted haystack then every time I print out the value of haystack, gdb spits value optimized out. I have -O0 set in makefile. I have tried compiling without the -O0 flag, still the same. Info locals also gives the same .


"This is a bug in clang, which has been fixed in version 3.5. The CS50 team is working on getting an update out with update50." -see link

Variable optimized out eventhough it will be used later

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .