Keil C 8051: без volatile:
1 #include <stdio.h> 2 3 void main( void ) 4 { 5 1 int x = 123; 6 1 *( int*)&x; *** WARNING C275 IN LINE 6 OF MAIN.C: expression with possibly no effect 7 1 } ; FUNCTION main (BEGIN) ; SOURCE LINE # 3 ; SOURCE LINE # 4 ; SOURCE LINE # 5 0000 750000 R MOV x,#00H 0003 75007B R MOV x+01H,#07BH ; SOURCE LINE # 6 ; SOURCE LINE # 7 0006 22 RET ; FUNCTION main (END)c volatile:
1 #include <stdio.h> 2 3 void main( void ) 4 { 5 1 int x = 123; 6 1 *(volatile int*)&x; 7 1 } ; FUNCTION main (BEGIN) ; SOURCE LINE # 3 ; SOURCE LINE # 4 ; SOURCE LINE # 5 0000 750000 R MOV x,#00H 0003 75007B R MOV x+01H,#07BH ; SOURCE LINE # 6 0006 AE00 R MOV R6,x 0008 AF00 R MOV R7,x+01H ; SOURCE LINE # 7 000A 22 RET ; FUNCTION main (END)