OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.dg/] [other/] [stdarg1.C] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
// Test stdarg function with anonymous argument
2
// { dg-do run }
3
 
4
#include 
5
 
6
extern "C" void abort (void);
7
 
8
void baz (va_list list)
9
{
10
  if (va_arg (list, long) != 3)
11
    abort ();
12
}
13
 
14
void foo (long p1, long, long p2, ...)
15
{
16
  va_list list;
17
  va_start (list, p2);
18
  baz (list);
19
  va_end (list);
20
}
21
 
22
int main ()
23
{
24
  foo (0, 1, 2, (long)3);
25
  return 0;
26
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.