How to debug uninitialized variables in VC ++

How to debug uninitialized variables in release mode in C ++.

+3
source share
7 answers

Uninitialized variables are an unpleasant search error. Some static checkers will probably be able to find your uninitialized variable. There are open source. You can also get a trial version of the commercial version.

0
source

There is a warning there. You should always try to compile cleanly at the highest level of warning. For VC ++, this is level 4. Disable certain annoying warnings selectively.

, , , V++ /RTCu ( /RTCsu), strong > .

, ( ) .

+10

, , , / ctors, .

- int, , ( , , ).

, , , . , . : , , / .

+2

V++, gcc -Wuninitialized, . : http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

: -Wuninitialized -Wall, .. , . , -Werror , .

+1

, , , , .

. , .

0

. - , , Visual Studio.

- .

0

- CPPcheck (open-source) PC-Lint (), . .

0

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


All Articles