I am getting the following error during compilation:
error: ‘asm’ undeclared (first use in this function)
EXCHANGE( s, *(a) );
^
in a header
You are compiling with option -std=c99
.
This disables some non-standard GCC extensions like the asm
feature.
See https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-std-112 for some (not very precise) documentation.
Remove or change the line set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
from your cmakefile if you need inline assembly.