summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/other/error15.C
blob: 3601852322a41c143725950137da67edbac9d4b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Test that duplicate function parameters are found in declarations.

extern void g0 (int a, int b);
extern void g1 (int a, float b);

extern void f0 (int a,		// { dg-error "previous" }
                int a);		// { dg-error "redefinition" }
extern void f1 (int a,		// { dg-error "previous" }
                float a);	// { dg-error "conflicting" }
extern void f3 (int a, int b, int c, // { dg-error "previous" }
                int a);		// { dg-error "redefinition" }
extern void f4 (int a, int b, int c, // { dg-error "previous" }
                int a,		     // { dg-error "redefinition" }
                int a);		     // { dg-error "redefinition" }
extern void f5 (int a, int b, int c, int d, int e, int f, int g, int h, // { dg-error "previous" }
                int a,							// { dg-error "redefinition" }
                int i, int j, int k, int l, int m, int n, int o, int p,
                int q, int r, int s, int t, int u, int v, int w, int x, int y,
                int z);

extern void f6 (int a, int, int, int, int, int, int, int, int, int, int, // { dg-error "previous" }
                int a,		// { dg-error "redefinition" }
                int, int, int, int, int, int, int, int, int, int, int,
                float, float, float, float, float, float, float, float,
                int);

extern void f7 (void (*a)(int),	  // { dg-error "previous" }
                void (*a)(int));  // { dg-error "redefinition" }
extern void f8 (float (*a)(int),  // { dg-error "previous" }
                int (*a)(float));  // { dg-error "conflicting" }

extern void f9 (int a,		// { dg-error "previous" }
                int a,		// { dg-error "redefinition" }
                int a);		// { dg-error "redefinition" }

extern void f10 (int a,		// { dg-error "previous" }
                 int b,		// { dg-error "previous" }
                 int c,		// { dg-error "previous" }
                 int c,		// { dg-error "redefinition" }
                 int b,		// { dg-error "redefinition" }
                 int a);	// { dg-error "redefinition" }

class C1 {
 public:
  void C1_g0 (int a, int b);
  void C1_f0 (int a,		// { dg-error "previous" }
              int a);		// { dg-error "redefinition" }
};

template <class T>
class C2 {
 public:
  void C2_g0 (T a, T b);
  void C2_f0 (T a,		// { dg-error "previous" }
              T a);		// { dg-error "redefinition" }
};