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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [testsuite/] [gdb.c++/] [cttiadd3.cc] - Blame information for rev 107

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

Line No. Rev Author Line
1 106 markom
template<class T> T add3(T v1, T v2)
2
{
3
   T v3;
4
   v3 = v1;
5
   v3 += v2;
6
   return v3;
7
}
8
 
9
template<class T> T add4(T v1, T v2)
10
{
11
   T v3;
12
   v3 = v1;
13
   v3 += v2;
14
   return v3;
15
}
16
 
17
void subr3()
18
{
19
  char c;
20
  int i;
21
  float f;
22
 
23
  c = 'b';
24
  i = 3;
25
  f = 6.5;
26
 
27
  c = add3(c, c);
28
  i = add3(i, i);
29
  f = add3(f, f);
30
  c = add4(c, c);
31
  i = add4(i, i);
32
  f = add4(f, f);
33
}

powered by: WebSVN 2.1.0

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