I've been playing with generated (native) code in order to test how compilers (specific or in general) translate a = a + 1
and a++
, and found some other interesting optimizations. I used gcc
compiler for this simple program:
int main() {
int a = 0;
a = a + 1;
int b = 0;