Quantcast
Viewing all articles
Browse latest Browse all 22157

gcc shows different warnings depending on optimisation level

I compiled a C program with -O0 -Wall and then -O1, -O2, -O3 and I received different warning messages, some of them actually important enough that they showed actual bugs (for instance a function returning a string that was local instead of static in -O1 IIRC).

Why is that ? Can I get more warnings ?


Viewing all articles
Browse latest Browse all 22157

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>