Tool/software: TI C/C++ Compiler
I have a structure set up like this:
struct foo{ uint8_t low; uint8_t high; } foo;
And when I do this:
void foo(){ uint16_t volatile *bar; bar = (uint16_t volatile *) &foo.low }
the pointer bar does not get the address of the foo.low byte. Instead it's something completely different. In this specific compile version the address of the foo.low is 0x0000B2E6 but the pointer bar points to 0x000003C2 which is just plain wrong.
The debugger expressions thinks it should work brilliantly i.e. *(uint16_t volatile *) &foo.low resolves to a 16-bit value with foo.high being top byte.