gcc/ChangeLog:
* doc/extend.texi: Move _Countof under 'Syntax Extensions'.
Signed-off-by: Alejandro Colomar <[email protected]>
---
gcc/doc/extend.texi | 62 ++++++++++++++++++++++-----------------------
1 file changed, 31 insertions(+), 31 deletions(-)
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index a12855de6a6e..d58260e295a5 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -31,7 +31,6 @@ extensions, accepted by GCC in C90 mode and in C++.
* Thread-Local:: Per-thread variables.
* OpenMP:: Multiprocessing extensions.
* OpenACC:: Extensions for offloading code to accelerator devices.
-* _Countof:: The number of elements of arrays.
* Inline:: Defining inline functions (as fast as macros).
* Volatiles:: What constitutes an access to a volatile object.
* Using Assembly Language with C:: Instructions and extensions for interfacing
C with assembler.
@@ -10850,36 +10849,6 @@ library.
@xref{OpenMP and OpenACC Options}, for additional options useful with
@option{-fopenacc}.
-@node _Countof
-@section Determining the Number of Elements of Arrays
-@cindex _Countof
-@cindex number of elements
-
-The keyword @code{_Countof} determines
-the number of elements of an array operand.
-Its syntax is similar to @code{sizeof}.
-The operand must be
-a parenthesized complete array type name
-or an expression of such a type.
-For example:
-
-@smallexample
-int a[n];
-_Countof (a); // returns n
-_Countof (int [7][3]); // returns 7
-@end smallexample
-
-The result of this operator is an integer constant expression,
-unless the array has a variable number of elements.
-The operand is only evaluated
-if the array has a variable number of elements.
-For example:
-
-@smallexample
-_Countof (int [7][n++]); // integer constant expression
-_Countof (int [n++][7]); // run-time value; n++ is evaluated
-@end smallexample
-
@node Inline
@section An Inline Function is As Fast As a Macro
@cindex inline functions
@@ -13301,6 +13270,7 @@ C and/or C++ standards, while others remain specific to
GNU C.
* Labels as Values:: Getting pointers to labels, and computed gotos.
* Nested Functions:: Nested functions in GNU C.
* Typeof:: @code{typeof}: referring to the type of an expression.
+* _Countof:: Determining the Number of Elements of Arrays
* Offsetof:: Special syntax for @code{offsetof}.
* Alignment:: Determining the alignment of a function, type or
variable.
* Enum Extensions:: Forward declarations and specifying the underlying
type.
@@ -13937,6 +13907,36 @@ evaluated only once when using @code{__auto_type}, but
twice if
@code{typeof} is used.
@end itemize
+@node _Countof
+@subsection Determining the Number of Elements of Arrays
+@findex _Countof
+@findex number of elements
+
+The keyword @code{_Countof} determines
+the number of elements of an array operand.
+Its syntax is similar to @code{sizeof}.
+The operand must be
+a parenthesized complete array type name
+or an expression of such a type.
+For example:
+
+@smallexample
+int a[n];
+_Countof (a); // returns n
+_Countof (int [7][3]); // returns 7
+@end smallexample
+
+The result of this operator is an integer constant expression,
+unless the array has a variable number of elements.
+The operand is only evaluated
+if the array has a variable number of elements.
+For example:
+
+@smallexample
+_Countof (int [7][n++]); // integer constant expression
+_Countof (int [n++][7]); // run-time value; n++ is evaluated
+@end smallexample
+
@node Offsetof
@subsection Support for @code{offsetof}
@findex __builtin_offsetof
--
2.51.0