Uninitialized memory access

Uninitialized memory access



I'm using Inspector XE 2017 Update4 to detect memory problem in my application. But I find a strange problem. Even my code is very simple. Look below.




#include "stdafx.h"

#include <iostream>


int main()


int v1 = 0;


std::cin >> v1;


    return 0;





My IDE is VS2015, the Inspector XE 2017 keeps telling me that I accessed uninitialized memory with "std::cin >> v1". Actually, I've initialized it, so I don't know where the problem is.


1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.