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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [other/] [error15.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// Test that duplicate function parameters are found in declarations.
2
 
3
extern void g0 (int a, int b);
4
extern void g1 (int a, float b);
5
 
6
extern void f0 (int a,          // { dg-error "previous" }
7
                int a);         // { dg-error "redefinition" }
8
extern void f1 (int a,          // { dg-error "previous" }
9
                float a);       // { dg-error "conflicting" }
10
extern void f3 (int a, int b, int c, // { dg-error "previous" }
11
                int a);         // { dg-error "redefinition" }
12
extern void f4 (int a, int b, int c, // { dg-error "previous" }
13
                int a,               // { dg-error "redefinition" }
14
                int a);              // { dg-error "redefinition" }
15
extern void f5 (int a, int b, int c, int d, int e, int f, int g, int h, // { dg-error "previous" }
16
                int a,                                                  // { dg-error "redefinition" }
17
                int i, int j, int k, int l, int m, int n, int o, int p,
18
                int q, int r, int s, int t, int u, int v, int w, int x, int y,
19
                int z);
20
 
21
extern void f6 (int a, int, int, int, int, int, int, int, int, int, int, // { dg-error "previous" }
22
                int a,          // { dg-error "redefinition" }
23
                int, int, int, int, int, int, int, int, int, int, int,
24
                float, float, float, float, float, float, float, float,
25
                int);
26
 
27
extern void f7 (void (*a)(int),   // { dg-error "previous" }
28
                void (*a)(int));  // { dg-error "redefinition" }
29
extern void f8 (float (*a)(int),  // { dg-error "previous" }
30
                int (*a)(float));  // { dg-error "conflicting" }
31
 
32
extern void f9 (int a,          // { dg-error "previous" }
33
                int a,          // { dg-error "redefinition" }
34
                int a);         // { dg-error "redefinition" }
35
 
36
extern void f10 (int a,         // { dg-error "previous" }
37
                 int b,         // { dg-error "previous" }
38
                 int c,         // { dg-error "previous" }
39
                 int c,         // { dg-error "redefinition" }
40
                 int b,         // { dg-error "redefinition" }
41
                 int a);        // { dg-error "redefinition" }
42
 
43
class C1 {
44
 public:
45
  void C1_g0 (int a, int b);
46
  void C1_f0 (int a,            // { dg-error "previous" }
47
              int a);           // { dg-error "redefinition" }
48
};
49
 
50
template 
51
class C2 {
52
 public:
53
  void C2_g0 (T a, T b);
54
  void C2_f0 (T a,              // { dg-error "previous" }
55
              T a);             // { dg-error "redefinition" }
56
};

powered by: WebSVN 2.1.0

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