The blacklisted flags that you mentions are not danger at all if the code is written properly. I mean that these flags are doing more aggressive optimizations(but nothing illegal). The real problem is that most of the time there is code that is relying on the so called "undefined behavior" that can produce different results with -O2 and -O3. That is why it is called "undefined" but rarely the developers respect that...