Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22201

Would a modern compiler optimize "if false" paths?

$
0
0

Would a modern compiler (GCC) be smart enough to optimize this no-op function out?I know that they can optimize no-op's out but I'm wondering how well they can determine if a function call is actually a no-op.

void someFunction(){    if false{        doFunction()    }}

Viewing all articles
Browse latest Browse all 22201

Trending Articles



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