With the code I just posed, or with your post?
My code compiles with gcc-mignw 3.4.2.
What options are you using for gcc? If you give -ansi, then all asm-statements are syntax errors, since asm is not ansi compliant. You can still use inline assembler if you use __asm__ instead of asm, in which case my code also compiles with -ansi.
--Code:register int x __asm__("ebx");
Mats