As far as I can tell, the only difference between __asm { ... }; and __asm__(\"...\"); is that the first uses mov eax, var and the sec
asm vs __asm__ in GCC
asm does not work with -std=c99, you have two alternatives:
__asm__-std=gnu99More details: error: ‘asm’ undeclared (first use in this function)
__asm vs __asm__ in GCC
I could not find where __asm is documented (notably not mentioned at https://gcc.gnu.org/onlinedocs/gcc-7.2.0/gcc/Alternate-Keywords.html#Alternate-Keywords ), but from the GCC 8.1 source they are exactly the same:
{ "__asm", RID_ASM, 0 },
{ "__asm__", RID_ASM, 0 },
so I would just use __asm__ which is documented.