What I described should work using Visual C++ and g++ as well. I don't know about the embedded systems, so thanks for clarifying.
Not for me...
c:\test>cat a.cpp
#include <stdio.h>
int main()
{
int* ptr;
printf("%p\n", ptr);
}
c:\test>g++ a.cpp
c:\test>a.exe
7EFDE000
c:\test>cl a.cpp /nologo
a.cpp
c:\test\a.cpp(5) : warning C4700: uninitialized local variable 'ptr' used
c:\test>a.exe
00000001
c:\test>