]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
inline-asm: Clarify documentation of operand syntax [PR67301]
authorSandra Loosemore <sloosemore@baylibre.com>
Sat, 8 Mar 2025 05:23:55 +0000 (05:23 +0000)
committerSandra Loosemore <sloosemore@baylibre.com>
Sat, 8 Mar 2025 05:35:26 +0000 (05:35 +0000)
gcc/ChangeLog
PR c/67301
* doc/extend.texi (Extended Asm): Clarify that the square brackets
around the asmSymbolicName of operands are a required part of
the syntax.

gcc/doc/extend.texi

index 13cbc72ed24cda4f5bfca1f5df5e45b8e8f0f127..5e40cf8387bbd46916233bc3cbd8b3eb528f3125 100644 (file)
@@ -11473,10 +11473,11 @@ Operands are separated by commas.  Each operand has this format:
 
 @table @var
 @item asmSymbolicName
-Specifies a symbolic name for the operand.
-Reference the name in the assembler template 
-by enclosing it in square brackets 
-(i.e.@: @samp{%[Value]}). The scope of the name is the @code{asm} statement 
+Specifies an optional symbolic name for the operand.  The literal square
+brackets @samp{[]} around the @var{asmSymbolicName} are required both
+in the operand specification and references to the operand in the assembler
+template, i.e.@: @samp{%[Value]}.
+The scope of the name is the @code{asm} statement
 that contains the definition. Any valid C variable name is acceptable, 
 including names already defined in the surrounding code. No two operands 
 within the same @code{asm} statement can use the same symbolic name.
@@ -11762,10 +11763,11 @@ Operands are separated by commas.  Each operand has this format:
 
 @table @var
 @item asmSymbolicName
-Specifies a symbolic name for the operand.
-Reference the name in the assembler template 
-by enclosing it in square brackets 
-(i.e.@: @samp{%[Value]}). The scope of the name is the @code{asm} statement 
+Specifies an optional symbolic name for the operand.  The literal square
+brackets @samp{[]} around the @var{asmSymbolicName} are required both
+in the operand specification and references to the operand in the assembler
+template, i.e.@: @samp{%[Value]}.
+The scope of the name is the @code{asm} statement
 that contains the definition. Any valid C variable name is acceptable, 
 including names already defined in the surrounding code. No two operands 
 within the same @code{asm} statement can use the same symbolic name.