https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67301
--- Comment #2 from Jeffrey Walton <noloader at gmail dot com> --- (In reply to Andrew Pinski from comment #1) > 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. Oh, I see. Yes, that's confusing. When I read it, I thought the double square brackets were a typo that should have read something like the following, meaning the asmSymbolicName is optional (which it is): [ [asmSymbolicName] constraint (cexpression) ] Perhaps the docs should call that out specifically to avoid confusion?