va_list(3type)
π va_list(3type) β the variable argument list, bestie π
okay so you know how some functions are like "idk how many args you're gonna give me, surprise me"? yeah. that's what va_list is for. it's the variable argument list type from the 3type section of the manual, and she is that girl. π
π LIBRARY
Standard C library (libc) π«Ά
β¨ SYNOPSIS β¨
#include <stdarg.h>
typedef /* ... */ va_list;
look at her. mysterious. the /* ... */ is doing main character energy because the actual definition is implementation-defined. iconic. π
πΈ DESCRIPTION πΈ
So here's the vibe: va_list is used by functions that take a varying number of arguments of varying types. Like, a function that's just like "bring whoever, bring whatever." π¦
The function must declare an object of type va_list, and that object is what the macros va_start(3), va_arg(3), va_copy(3), and va_end(3) use to traverse the list of arguments. Think of it like the lil itinerary for walking through all the args you got handed. π
no cap: if you skip declaring that va_list object, the whole thing falls apart. it's giving necessary. π
β STANDARDS β
C11POSIX.1-2024
she's certified. she's standardized. periodt. π
π HISTORY π
C89SUSv1POSIX.1-2001
she's been here since forever, lowkey an elder icon at this point. π
π NOTES π
heads up bestie β these headers also provide va_list, so you're not stuck with just <stdarg.h>:
<stdio.h><wchar.h>
fr fr, she gets around. π§
π SEE ALSO π
the whole squad. go read them, iykyk. π
and that's the page, bestie!! this was Linux man-pages 6.20, dated 2026-02-08 β mwah, slay, go write some variadic functions responsibly πβ¨ππ¦π
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: Linux-man-pages-copyleft
- Copyright 2020, Michael Kerrisk <mtk.manpages@gmail.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms