aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2023-01-27 11:17:35 +0100
committerJakub Jelinek <jakub@redhat.com>2023-01-27 11:17:35 +0100
commit16f30680f403891556da2ad6329fcef9dc9b47db (patch)
tree5623cd8485e8031e98217a8920805f520b7ebec3
parentbd246ac68239d944b01c213c39d6e212362c1b40 (diff)
downloadgcc-16f30680f403891556da2ad6329fcef9dc9b47db.zip
gcc-16f30680f403891556da2ad6329fcef9dc9b47db.tar.gz
gcc-16f30680f403891556da2ad6329fcef9dc9b47db.tar.bz2
doc: Fix up return type of __builtin_va_arg_pack_len [PR108560]
__builtin_va_arg_pack_len as implemented returned int since its introduction in 2007. The initial documentation didn't mention any return type, which changed in 2010 in r0-103077-gab940b73bfabe2cec4 during some documentation formatting cleanups https://gcc.gnu.org/legacy-ml/gcc-patches/2010-09/msg01632.html I can understand that for formatting some type was needed there but what exactly hasn't been really discussed. So, I think we should change documentation to match the implementation, rather than change implementation to match the documentation. Most people don't use more than 2147483647 arguments to inline functions, and on poor targets with 16-bit ints I bet even having more than 65535 arguments to inline functions would be highly unexpected. 2023-01-27 Jakub Jelinek <jakub@redhat.com> PR other/108560 * doc/extend.texi: Fix up return type of __builtin_va_arg_pack_len from size_t to int.
-rw-r--r--gcc/doc/extend.texi2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 4a89a3e..027a08a 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -688,7 +688,7 @@ myprintf (FILE *f, const char *format, ...)
@end smallexample
@end deftypefn
-@deftypefn {Built-in Function} {size_t} __builtin_va_arg_pack_len ()
+@deftypefn {Built-in Function} {int} __builtin_va_arg_pack_len ()
This built-in function returns the number of anonymous arguments of
an inline function. It can be used only in inline functions that
are always inlined, never compiled as a separate function, such