There are warning flags that aren't even usable unless you're compiling with optimization on, such as -Wuninitialized.
As the gcc man page says, "These warnings are possible only in optimizing compilation, because they require data flow information that is computed only when optimizing." (emphasis mine)