https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67301
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Try: int main(int argc, char* argv[]) { __asm__ __volatile__ ( "\t movl %[__ARGC], %%eax \n" : : [__ARGC] "r" (argc) ); return 0; } Basically the syntax for naming operands is [XYZ] but since it is optional, [ is used to say it is optional part of the syntax. Yes it is slightly confusing but that is what you get when you use [] as both part of the actual syntax and saying it is an optional part.