Add anchors for the hardbool and uninitialized attributes and then link directly to them.
gcc/ChangeLog: * doc/extend.texi (Common Variable Attributes): Add @anchor to hardbool attribute. (Common Type Attributes): Add @anchor to uninitialized attribute. * doc/invoke.texi (Optimize Options): Use new anchors for cross-references from -ftrivial-auto-var-init description. --- OK for trunk? Relevant branches too? (The hardbool attribute is only on gcc-14 so obviously that part won't backport.) gcc/doc/extend.texi | 2 ++ gcc/doc/invoke.texi | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index bae3fba6b2b..5e7b7503e8c 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -8476,6 +8476,7 @@ will be placed in new, unique sections. This additional functionality requires Binutils version 2.36 or later. +@anchor{@code{uninitialized} variable attribute} @cindex @code{uninitialized} variable attribute @item uninitialized This attribute, attached to a variable with automatic storage, means that @@ -9315,6 +9316,7 @@ its enumerators are used in bitwise operations, so e.g. @option{-Wswitch} should not warn about a @code{case} that corresponds to a bitwise combination of enumerators. +@anchor{@code{hardbool} type attribute} @cindex @code{hardbool} type attribute @item hardbool @itemx hardbool (@var{false_value}) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 4fbb4cda101..c7bbb92363c 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -14354,8 +14354,9 @@ Note that the initializer values, whether @samp{zero} or @samp{pattern}, refer to data representation (in memory or machine registers), rather than to their interpretation as numerical values. This distinction may be important in languages that support types with biases or implicit -multipliers, and with such extensions as @samp{hardbool} (@pxref{Type -Attributes}). For example, a variable that uses 8 bits to represent +multipliers, and with such extensions as @samp{hardbool} +(@pxref{@code{hardbool} type attribute}). +For example, a variable that uses 8 bits to represent (biased) quantities in the @code{range 160..400} will be initialized with the bit patterns @code{0x00} or @code{0xFE}, depending on @var{choice}, whether or not these representations stand for values in @@ -14372,7 +14373,8 @@ are initialized with @code{false} (zero), even when @samp{pattern} is requested. You can control this behavior for a specific variable by using the variable -attribute @code{uninitialized} (@pxref{Variable Attributes}). +attribute @code{uninitialized} (@pxref{@code{uninitialized} variable +attribute}). @opindex fvect-cost-model @item -fvect-cost-model=@var{model} -- 2.48.1