We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I regularly get this when debugging. Optimisations are turned off. Current instance exhibits it perfectly - linked list management where I have just printed some of the local variables and am about to add them to the list. On return from teh fn that adds them to list the list is out of scope. There are quite a lot of local variables (14) because I am trying to track a bug. "not in scope" reported in both watch window and call stack.
e.g. printf("MIL Section [%s] key <%s> val <%s>\r\n", entry.section ? entry.section : "NULL", entry.key, entry.value); if (entry.section) { strcpy(section, entry.section); } AddEntryToList(&mil_list, entry.section, entry.key, entry.value, section);
when on the line if (entry.section) the local var "entry" apparently is out of scope.
Anyone found a way of giving the package (MDK on STM32) a thump - I've tried a complete rebuild and restarting the IDE
Well the printf has happened as I see the output - it is purely the variables being out of scope