tx_buffer = vserial>>24; 450: 89 2f mov r24, r25 452: 99 27 eor r25, r25 454: aa 27 eor r26, r26 456: bb 27 eor r27, r27 458: 80 93 81 00 sts 0x0081, r24
looking at that code, obviously the compiler has recognised that vserial>>24 selects the top byte: it hasn't tried to do 24 shifts. So it has recognised the right side of the equation.
But it hasn't recognised that taken together the whole assignment statement is a recognisable idiom.
Is this generally true about GCC? Can it only recognise idioms on the right of the assignment? It seems odd, given that vserial>>24 is not a sequence point?