Explicitly initialize DWORD to 1, but the debugger explicitly shows out of range

I am a little excited about this problem - in debug mode this problem does not occur at all, but in release mode it seems that I can hardly do anything to fix it.

Here is a screenshot of what is happening inside VS2013:

enter image description here

I initialize nResultto 1L, and the internal value is shown as 3422785012. In debug mode, this value is really 1L.

Any ideas as to why the displayed value is not close to the initial value set for nResult? I tried playing with the compiler settings - in debug mode this code works fine.

+4
source share
2

optimized. , , , .

, , .

, , " " Visual Studio, C/++ . .

+13

, , , .

"release" - , . , . , x64, x64 , x86 ( ).

+3

Source: https://habr.com/ru/post/1538463/


All Articles