Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/other/stdarg1.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
// Test stdarg function with anonymous argument // { dg-do run } // { dg-options "-Wno-abi" { target arm_eabi } } #include <stdarg.h> extern "C" void abort (void); void baz (va_list list) { if (va_arg (list, long) != 3) abort (); } void foo (long p1, long, long p2, ...) { va_list list; va_start (list, p2); baz (list); va_end (list); } int main () { foo (0, 1, 2, (long)3); return 0; }