Why is -Winit-self separate from -Wuninitialized
问题 This Question is about getting the gcc compiler to warn when you make a typo and initialize a variable with itself. int f() { int i = i; return i; } It turns out you need the -Winit-self flag in addition to -Wuninitialized : -Winit-self (C, C++, Objective-C and Objective-C++ only) Warn about uninitialized variables which are initialized with themselves. Note this option can only be used with the -Wuninitialized option, which in turn only works with -O1 and above. My question is: Why is this