The uVision3 IDE watch window shows the value of pString incorrectly (when stopped on a breakpoint in the "bug" function), unless pString is actually referenced in the function (by, for example, uncommenting the line "pString[0] = 0"). This is true even if the code optimizations are set to the lowest level possible.
#include <string.h> int bug(int *nState,char *pString) { *nState = 0; // pString[0] = 0; return(0); } void main(void) { int foo = 0; char *bar; char s[] = "KEIL uVision3 for ARM\r"; bar = s; bug(&foo,bar); while(1); }