Here is a simple example.
void func() { int* p = nullptr; if(p == nullptr) { int n; p = &n; } *p = 10; // undefined behavior?? } int main() { func(); } There is no complie warning(visual studio 2019), is it "undefined behavior" to use "* p = 10" in this way?
Can it vary by compiler or by debug or release?