You can check such things quite simple. Compile your example into an object file with debug information and run objdump to disassemble it and display the assembly along with the C source code:
cc -g -c example.c
objdump -dS example.o
Doing that will for your example show that even without optimizations each variant produces exactly the same assembler code.