/* Copyright 2017-2026, NVIDIA CORPORATION. All rights reserved. */

/* This file is pre-included whenever nvc++ is invoked with --nvcchost, even if
   --no_preincludes is used.  The contents are a workaround for nvcc expecting
   nvc++ to handle __builtin_va_list differently than how nvc++ actually
   handles it. */

#if defined(__PREPROCESS_ONLY__)

struct __va_list_tag {
  unsigned int gp_offset;
  unsigned int fp_offset;
  char *overflow_arg_area;
  char *reg_save_area;
};

typedef struct __va_list_tag __pgi_va_list_helper[1];
#line 1234
typedef __pgi_va_list_helper __pgi_va_list;

#define __builtin_va_list __pgi_va_list

#else

#define __PGI_VA_TAG_MACRO(x) __pgi_va_list_helper_ ## x
#define __PGI_VA_TAG_MACRO_2(x) __PGI_VA_TAG_MACRO(x)
#define __pgi_va_list_helper __PGI_VA_TAG_MACRO_2(__LINE__)
typedef __builtin_va_list __pgi_va_list_helper_1234;

#endif
