23 lines · c
1/*===---- __stdarg_va_arg.h - Definitions of va_start, va_arg, va_end-------===2 *3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4 * See https://llvm.org/LICENSE.txt for license information.5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6 *7 *===-----------------------------------------------------------------------===8 */9 10#ifndef va_arg11 12#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L13/* C23 uses a special builtin. */14#define va_start(...) __builtin_c23_va_start(__VA_ARGS__)15#else16/* Versions before C23 do require the second parameter. */17#define va_start(ap, param) __builtin_va_start(ap, param)18#endif19#define va_end(ap) __builtin_va_end(ap)20#define va_arg(ap, type) __builtin_va_arg(ap, type)21 22#endif23