...
The two keywords behave the same. The keyword asm is not available in ISO C programs, so if you want compatibility with those, you should use the alternate keyword __asm__. See Alternate Keywords in the GCC manual for details.
volatile vs __volatile__
Panel | ||
---|---|---|
| ||
This otherwise useful howto claims the following:
However, this contradicts the gcc manual, which clearly states that the volatile keyword on asm statements will not stop the compiler from moving the asm instructions, including across jump instructions (see Extended Asm in the GCC manual). |
Clobbers memory
Volatile keyword elsewhere
...