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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.pt/] [vaarg2.C] - Blame information for rev 749

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do assemble  }
2
// Copyright (C) 2000 Free Software Foundation
3
// Contributed by Nathan Sidwell 22 June 2000 
4
 
5
// Origin GNATS bug report 63 from Kurt Garloff 
6
// We attempted to expand va_arg prematurely in a template function.
7
 
8
#include 
9
 
10
template 
11
void PrintArgs (Type somearg, ...)
12
{
13
va_list argp;
14
va_start (argp, somearg);
15
Type value;
16
while ( ( value = va_arg (argp, Type) ) > 0.0)
17
  continue;
18
va_end (argp);
19
}
20
 
21
int main (void)
22
{
23
double dummy = 0;
24
PrintArgs (dummy, 1.0, 2.0, 3.0, -1.0);
25
return 0;
26
}

powered by: WebSVN 2.1.0

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