aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandra Loosemore <sloosemore@baylibre.com>2025-03-08 05:23:55 +0000
committerSandra Loosemore <sloosemore@baylibre.com>2025-03-08 05:35:26 +0000
commitf0ff7539626e25341c1b450b537e69f86e0bd1f6 (patch)
treed2d272486cb45dd17061edfe2f62dd1bc4f05763
parent3014f8787196d7c0d15d24195c8f07167968ff55 (diff)
downloadgcc-f0ff7539626e25341c1b450b537e69f86e0bd1f6.zip
gcc-f0ff7539626e25341c1b450b537e69f86e0bd1f6.tar.gz
gcc-f0ff7539626e25341c1b450b537e69f86e0bd1f6.tar.bz2
inline-asm: Clarify documentation of operand syntax [PR67301]
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.
-rw-r--r--gcc/doc/extend.texi18
1 files changed, 10 insertions, 8 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 13cbc72..5e40cf8 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -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.