I think volatile make sence only if you turn on optimization flag of compiler ON.
In gcc you can use -o2 flag to pass to gcc while compile your code.
gcc -o2 -S prog.c
And check the code generated with and without volatile keywords.