Anyone else attempt Inline Assembly in XCode 4. I hate GCC's syntax (I mean seriously..... ). I got my old inline asm working (from version 3) by changing the complier from LLVM 2.0 to LLVM GCC 4.2. I can now compile the following code:
The code compiles, and executes without error, but the editor still thinks the code is in error (even though it compiles). I am getting an error "expecting '(' after 'asm'". Clearly the parser is not working. Anyone know how to fix this? Or anyone know of a better way to enable normal inline asm syntax.
P.S. Please do not comment about how I should not be using asm, I have my reasons.
Code:
int test = 0;
asm
{
pusha
mov eax, test
inc eax
inc eax
inc eax
mov test, eax
popa
}
printf("Result: %d\n", test);
The code compiles, and executes without error, but the editor still thinks the code is in error (even though it compiles). I am getting an error "expecting '(' after 'asm'". Clearly the parser is not working. Anyone know how to fix this? Or anyone know of a better way to enable normal inline asm syntax.
P.S. Please do not comment about how I should not be using asm, I have my reasons.