Skip to content

Commit ff99671

Browse files
committed
extend.texi: Fix up defbuiltin* with spaces in return type
In https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fstdc_005fbit_005ffloor I've noticed that while e.g. __builtin_stdc_bit_floor builtin is properly rendered in bold and bigger size, for the __builtin_stdc_bit_width builtin it is not the builtin name which is marked like that, but the keyword int before it. Also, seems such builtins are missing from the index. I've read the texinfo docs and they seem to suggest in https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Line-Macros.html that return types of functions with spaces in the return type should be wrapped with {}s and we already use that e.g. in @defbuiltin{{void *} __builtin_thread_pointer (void)} The following patch adjusts builtins I found which contained one or two spaces in the return type name (plus two spots which used 2 spaces after single keyword return type instead of 1 which triggered my search regex as well). 2023-12-01 Jakub Jelinek <[email protected]> * doc/extend.texi (__builtin_addc, __builtin_addcl, __builtin_addcll, __builtin_subc, __builtin_subcl, __builtin_subcll, __builtin_stdc_bit_width, __builtin_stdc_count_ones, __builtin_stdc_count_zeros, __builtin_stdc_first_leading_one, __builtin_stdc_first_leading_zero, __builtin_stdc_first_trailing_one, __builtin_stdc_first_trailing_zero, __builtin_stdc_has_single_bit, __builtin_stdc_leading_ones, __builtin_stdc_leading_zeros, __builtin_stdc_trailing_ones, __builtin_stdc_trailing_zeros, __builtin_nvptx_brev, __builtin_nvptx_brevll, __builtin_darn, __builtin_darn_raw, __builtin_ia32_vec_ext_v2di, __builtin_ia32_crc32qi, __builtin_ia32_crc32hi, __builtin_ia32_crc32si, __builtin_ia32_crc32di): Put {}s around return type with spaces in it. (__builtin_rx_mvfachi, __builtin_rx_mvfacmi): Remove superfluous whitespace.
1 parent c55c2ac commit ff99671

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

gcc/doc/extend.texi

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13237,9 +13237,9 @@ after addition, conditional jump on carry etc.
1323713237

1323813238
@enddefbuiltin
1323913239

13240-
@defbuiltin{unsigned int __builtin_addc (unsigned int a, unsigned int b, unsigned int carry_in, unsigned int *carry_out)}
13241-
@defbuiltinx{unsigned long int __builtin_addcl (unsigned long int a, unsigned long int b, unsigned int carry_in, unsigned long int *carry_out)}
13242-
@defbuiltinx{unsigned long long int __builtin_addcll (unsigned long long int a, unsigned long long int b, unsigned long long int carry_in, unsigned long long int *carry_out)}
13240+
@defbuiltin{{unsigned int} __builtin_addc (unsigned int a, unsigned int b, unsigned int carry_in, unsigned int *carry_out)}
13241+
@defbuiltinx{{unsigned long int} __builtin_addcl (unsigned long int a, unsigned long int b, unsigned int carry_in, unsigned long int *carry_out)}
13242+
@defbuiltinx{{unsigned long long int} __builtin_addcll (unsigned long long int a, unsigned long long int b, unsigned long long int carry_in, unsigned long long int *carry_out)}
1324313243

1324413244
These built-in functions are equivalent to:
1324513245
@smallexample
@@ -13259,9 +13259,9 @@ emitted if one of them (preferrably the third one) has only values
1325913259

1326013260
@enddefbuiltin
1326113261

13262-
@defbuiltin{unsigned int __builtin_subc (unsigned int a, unsigned int b, unsigned int carry_in, unsigned int *carry_out)}
13263-
@defbuiltinx{unsigned long int __builtin_subcl (unsigned long int a, unsigned long int b, unsigned int carry_in, unsigned long int *carry_out)}
13264-
@defbuiltinx{unsigned long long int __builtin_subcll (unsigned long long int a, unsigned long long int b, unsigned long long int carry_in, unsigned long long int *carry_out)}
13262+
@defbuiltin{{unsigned int} __builtin_subc (unsigned int a, unsigned int b, unsigned int carry_in, unsigned int *carry_out)}
13263+
@defbuiltinx{{unsigned long int} __builtin_subcl (unsigned long int a, unsigned long int b, unsigned int carry_in, unsigned long int *carry_out)}
13264+
@defbuiltinx{{unsigned long long int} __builtin_subcll (unsigned long long int a, unsigned long long int b, unsigned long long int carry_in, unsigned long long int *carry_out)}
1326513265

1326613266
These built-in functions are equivalent to:
1326713267
@smallexample
@@ -15166,7 +15166,7 @@ where @var{prec} is bit width of @var{type}, except that side-effects
1516615166
in @var{arg} are evaluated just once.
1516715167
@enddefbuiltin
1516815168

15169-
@defbuiltin{unsigned int __builtin_stdc_bit_width (@var{type} @var{arg})}
15169+
@defbuiltin{{unsigned int} __builtin_stdc_bit_width (@var{type} @var{arg})}
1517015170
The @code{__builtin_stdc_bit_width} function is available only
1517115171
in C. It is type-generic, the argument can be any unsigned integer
1517215172
(standard, extended or bit-precise). No integral argument promotions are
@@ -15175,87 +15175,87 @@ performed on the argument. It is equivalent to
1517515175
where @var{prec} is bit width of @var{type}.
1517615176
@enddefbuiltin
1517715177

15178-
@defbuiltin{unsigned int __builtin_stdc_count_ones (@var{type} @var{arg})}
15178+
@defbuiltin{{unsigned int} __builtin_stdc_count_ones (@var{type} @var{arg})}
1517915179
The @code{__builtin_stdc_count_ones} function is available only
1518015180
in C. It is type-generic, the argument can be any unsigned integer
1518115181
(standard, extended or bit-precise). No integral argument promotions are
1518215182
performed on the argument. It is equivalent to
1518315183
@code{(unsigned int) __builtin_popcountg (@var{arg})}
1518415184
@enddefbuiltin
1518515185

15186-
@defbuiltin{unsigned int __builtin_stdc_count_zeros (@var{type} @var{arg})}
15186+
@defbuiltin{{unsigned int} __builtin_stdc_count_zeros (@var{type} @var{arg})}
1518715187
The @code{__builtin_stdc_count_zeros} function is available only
1518815188
in C. It is type-generic, the argument can be any unsigned integer
1518915189
(standard, extended or bit-precise). No integral argument promotions are
1519015190
performed on the argument. It is equivalent to
1519115191
@code{(unsigned int) __builtin_popcountg ((@var{type}) ~@var{arg})}
1519215192
@enddefbuiltin
1519315193

15194-
@defbuiltin{unsigned int __builtin_stdc_first_leading_one (@var{type} @var{arg})}
15194+
@defbuiltin{{unsigned int} __builtin_stdc_first_leading_one (@var{type} @var{arg})}
1519515195
The @code{__builtin_stdc_first_leading_one} function is available only
1519615196
in C. It is type-generic, the argument can be any unsigned integer
1519715197
(standard, extended or bit-precise). No integral argument promotions are
1519815198
performed on the argument. It is equivalent to
1519915199
@code{__builtin_clzg (@var{arg}, -1) + 1U}
1520015200
@enddefbuiltin
1520115201

15202-
@defbuiltin{unsigned int __builtin_stdc_first_leading_zero (@var{type} @var{arg})}
15202+
@defbuiltin{{unsigned int} __builtin_stdc_first_leading_zero (@var{type} @var{arg})}
1520315203
The @code{__builtin_stdc_first_leading_zero} function is available only
1520415204
in C. It is type-generic, the argument can be any unsigned integer
1520515205
(standard, extended or bit-precise). No integral argument promotions are
1520615206
performed on the argument. It is equivalent to
1520715207
@code{__builtin_clzg ((@var{type}) ~@var{arg}, -1) + 1U}
1520815208
@enddefbuiltin
1520915209

15210-
@defbuiltin{unsigned int __builtin_stdc_first_trailing_one (@var{type} @var{arg})}
15210+
@defbuiltin{{unsigned int} __builtin_stdc_first_trailing_one (@var{type} @var{arg})}
1521115211
The @code{__builtin_stdc_first_trailing_one} function is available only
1521215212
in C. It is type-generic, the argument can be any unsigned integer
1521315213
(standard, extended or bit-precise). No integral argument promotions are
1521415214
performed on the argument. It is equivalent to
1521515215
@code{__builtin_ctzg (@var{arg}, -1) + 1U}
1521615216
@enddefbuiltin
1521715217

15218-
@defbuiltin{unsigned int __builtin_stdc_first_trailing_zero (@var{type} @var{arg})}
15218+
@defbuiltin{{unsigned int} __builtin_stdc_first_trailing_zero (@var{type} @var{arg})}
1521915219
The @code{__builtin_stdc_first_trailing_zero} function is available only
1522015220
in C. It is type-generic, the argument can be any unsigned integer
1522115221
(standard, extended or bit-precise). No integral argument promotions are
1522215222
performed on the argument. It is equivalent to
1522315223
@code{__builtin_ctzg ((@var{type}) ~@var{arg}, -1) + 1U}
1522415224
@enddefbuiltin
1522515225

15226-
@defbuiltin{unsigned int __builtin_stdc_has_single_bit (@var{type} @var{arg})}
15226+
@defbuiltin{{unsigned int} __builtin_stdc_has_single_bit (@var{type} @var{arg})}
1522715227
The @code{__builtin_stdc_has_single_bit} function is available only
1522815228
in C. It is type-generic, the argument can be any unsigned integer
1522915229
(standard, extended or bit-precise). No integral argument promotions are
1523015230
performed on the argument. It is equivalent to
1523115231
@code{(_Bool) (__builtin_popcountg (@var{arg}) == 1)}
1523215232
@enddefbuiltin
1523315233

15234-
@defbuiltin{unsigned int __builtin_stdc_leading_ones (@var{type} @var{arg})}
15234+
@defbuiltin{{unsigned int} __builtin_stdc_leading_ones (@var{type} @var{arg})}
1523515235
The @code{__builtin_stdc_leading_ones} function is available only
1523615236
in C. It is type-generic, the argument can be any unsigned integer
1523715237
(standard, extended or bit-precise). No integral argument promotions are
1523815238
performed on the argument. It is equivalent to
1523915239
@code{(unsigned int) __builtin_clzg ((@var{type}) ~@var{arg}, @var{prec})}
1524015240
@enddefbuiltin
1524115241

15242-
@defbuiltin{unsigned int __builtin_stdc_leading_zeros (@var{type} @var{arg})}
15242+
@defbuiltin{{unsigned int} __builtin_stdc_leading_zeros (@var{type} @var{arg})}
1524315243
The @code{__builtin_stdc_leading_zeros} function is available only
1524415244
in C. It is type-generic, the argument can be any unsigned integer
1524515245
(standard, extended or bit-precise). No integral argument promotions are
1524615246
performed on the argument. It is equivalent to
1524715247
@code{(unsigned int) __builtin_clzg (@var{arg}, @var{prec})}
1524815248
@enddefbuiltin
1524915249

15250-
@defbuiltin{unsigned int __builtin_stdc_trailing_ones (@var{type} @var{arg})}
15250+
@defbuiltin{{unsigned int} __builtin_stdc_trailing_ones (@var{type} @var{arg})}
1525115251
The @code{__builtin_stdc_trailing_ones} function is available only
1525215252
in C. It is type-generic, the argument can be any unsigned integer
1525315253
(standard, extended or bit-precise). No integral argument promotions are
1525415254
performed on the argument. It is equivalent to
1525515255
@code{(unsigned int) __builtin_ctzg ((@var{type}) ~@var{arg}, @var{prec})}
1525615256
@enddefbuiltin
1525715257

15258-
@defbuiltin{unsigned int __builtin_stdc_trailing_zeros (@var{type} @var{arg})}
15258+
@defbuiltin{{unsigned int} __builtin_stdc_trailing_zeros (@var{type} @var{arg})}
1525915259
The @code{__builtin_stdc_trailing_zeros} function is available only
1526015260
in C. It is type-generic, the argument can be any unsigned integer
1526115261
(standard, extended or bit-precise). No integral argument promotions are
@@ -18730,11 +18730,11 @@ Disable global interrupt.
1873018730

1873118731
These built-in functions are available for the Nvidia PTX target:
1873218732

18733-
@defbuiltin{unsigned int __builtin_nvptx_brev (unsigned int @var{x})}
18733+
@defbuiltin{{unsigned int} __builtin_nvptx_brev (unsigned int @var{x})}
1873418734
Reverse the bit order of a 32-bit unsigned integer.
1873518735
@enddefbuiltin
1873618736

18737-
@defbuiltin{unsigned long long __builtin_nvptx_brevll (unsigned long long @var{x})}
18737+
@defbuiltin{{unsigned long long} __builtin_nvptx_brevll (unsigned long long @var{x})}
1873818738
Reverse the bit order of a 64-bit unsigned integer.
1873918739
@enddefbuiltin
1874018740

@@ -19231,8 +19231,8 @@ round to odd as the rounding mode.
1923119231
The following additional built-in functions are also available for the
1923219232
PowerPC family of processors, starting with ISA 3.0 or later:
1923319233

19234-
@defbuiltin{long long __builtin_darn (void)}
19235-
@defbuiltinx{long long __builtin_darn_raw (void)}
19234+
@defbuiltin{{long long} __builtin_darn (void)}
19235+
@defbuiltinx{{long long} __builtin_darn_raw (void)}
1923619236
@defbuiltinx{int __builtin_darn_32 (void)}
1923719237
The @code{__builtin_darn} and @code{__builtin_darn_raw}
1923819238
functions require a
@@ -22316,12 +22316,12 @@ multiplying the bottom 16 bits of the two arguments into the
2231622316
accumulator.
2231722317
@enddefbuiltin
2231822318

22319-
@defbuiltin{int __builtin_rx_mvfachi (void)}
22319+
@defbuiltin{int __builtin_rx_mvfachi (void)}
2232022320
Generates the @code{mvfachi} machine instruction to read the top
2232122321
32 bits of the accumulator.
2232222322
@enddefbuiltin
2232322323

22324-
@defbuiltin{int __builtin_rx_mvfacmi (void)}
22324+
@defbuiltin{int __builtin_rx_mvfacmi (void)}
2232522325
Generates the @code{mvfacmi} machine instruction to read the middle
2232622326
32 bits of the accumulator.
2232722327
@enddefbuiltin
@@ -23690,7 +23690,7 @@ Generates the @code{extractps} machine instruction.
2369023690
Generates the @code{pextrd} machine instruction.
2369123691
@enddefbuiltin
2369223692

23693-
@defbuiltin{long long __builtin_ia32_vec_ext_v2di (v2di, const int)}
23693+
@defbuiltin{{long long} __builtin_ia32_vec_ext_v2di (v2di, const int)}
2369423694
Generates the @code{pextrq} machine instruction in 64bit mode.
2369523695
@enddefbuiltin
2369623696

@@ -23719,19 +23719,19 @@ v2di __builtin_ia32_pcmpgtq (v2di, v2di);
2371923719
The following built-in functions are available when @option{-msse4.2} is
2372023720
used.
2372123721

23722-
@defbuiltin{unsigned int __builtin_ia32_crc32qi (unsigned int, unsigned char)}
23722+
@defbuiltin{{unsigned int} __builtin_ia32_crc32qi (unsigned int, unsigned char)}
2372323723
Generates the @code{crc32b} machine instruction.
2372423724
@enddefbuiltin
2372523725

23726-
@defbuiltin{unsigned int __builtin_ia32_crc32hi (unsigned int, unsigned short)}
23726+
@defbuiltin{{unsigned int} __builtin_ia32_crc32hi (unsigned int, unsigned short)}
2372723727
Generates the @code{crc32w} machine instruction.
2372823728
@enddefbuiltin
2372923729

23730-
@defbuiltin{unsigned int __builtin_ia32_crc32si (unsigned int, unsigned int)}
23730+
@defbuiltin{{unsigned int} __builtin_ia32_crc32si (unsigned int, unsigned int)}
2373123731
Generates the @code{crc32l} machine instruction.
2373223732
@enddefbuiltin
2373323733

23734-
@defbuiltin{unsigned long long __builtin_ia32_crc32di (unsigned long long, unsigned long long)}
23734+
@defbuiltin{{unsigned long long} __builtin_ia32_crc32di (unsigned long long, unsigned long long)}
2373523735
Generates the @code{crc32q} machine instruction.
2373623736
@enddefbuiltin
2373723737

0 commit comments

Comments
 (0)