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

gcc loop construct changes to assembly code [duplicate]

$
0
0

This question already has an answer here:

Why does the gcc compiler translate while loops into do-while constructs when creating assembly code? I know any while loop can be rewritten as a do-while for instance in c

while (test) { ... }

can be rewritten as

if ( !test ) goto skip;
do {
. . .
} while ( test );
skip:

Viewing all articles
Browse latest Browse all 22157

Trending Articles



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