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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [warn/] [Wunused-parm-3.C] - Blame information for rev 801

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
// { dg-options "-Wunused -W" }
3
// Suppress a warning that is irrelevant to the purpose of this test.
4
// { dg-options "-Wunused -W -Wno-abi" { target arm_eabi } }
5
 
6
#include 
7
 
8
struct A
9
{
10
  long a;
11
  A () : a (0) { }
12
  A (long x) : a (x) { }
13
  operator long () const { return a; }
14
  long operator- (const A& x) const { return a - x.a; }
15
};
16
 
17
long
18
fn1 (A a)
19
{
20
  return a - A (0);
21
}
22
 
23
struct B
24
{
25
  bool operator() (const int x, const int y) const throw() { return x < y; }
26
};
27
 
28
template 
29
bool
30
fn2 (int x, int y, T z)
31
{
32
  return z (x, y);
33
}
34
 
35
bool
36
fn3 (void)
37
{
38
  return fn2 (1, 2, B ());
39
}
40
 
41
int
42
fn4 (va_list ap)
43
{
44
  return va_arg (ap, int);
45
}
46
 
47
template 
48
T
49
fn5 (va_list ap)
50
{
51
  return va_arg (ap, T);
52
}
53
 
54
int
55
fn6 (va_list ap)
56
{
57
  return fn5  (ap);
58
}
59
 
60
template 
61
int
62
fn7 (T ap)
63
{
64
  return va_arg (ap, int);
65
}
66
 
67
int
68
fn8 (va_list ap)
69
{
70
  return fn7 (ap);
71
}

powered by: WebSVN 2.1.0

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