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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [warn/] [Wshadow-7.C] - Blame information for rev 774

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

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/44128
2
// { dg-options "-Wshadow" }
3
 
4
typedef long My_ssize_t;  // { dg-warning "shadowed declaration" }
5
typedef int Foo;          // { dg-warning "shadowed declaration" }
6
struct Bar1 {             // { dg-bogus "shadowed declaration" }
7
  int a;
8
};
9
struct Bar2 {             // { dg-warning "shadowed declaration" }
10
  int a;
11
};
12
 
13
void func() {
14
  typedef int My_ssize_t; // { dg-warning "shadows a global" }
15
  typedef char My_Num;    // { dg-warning "shadowed declaration" }
16
  {
17
    typedef short My_Num; // { dg-warning "shadows a previous local" }
18
  }
19
  int Foo;                // { dg-warning "shadows a global" }
20
  float Bar1;             // { dg-bogus "shadows a global" }
21
  struct Bar2 {           // { dg-warning "shadows a global" }
22
    int a;
23
  };
24
  struct Bar3 {           // { dg-warning "shadowed declaration" }
25
    int a;
26
  };
27
  struct Bar4 {           // { dg-bogus "shadowed declaration" }
28
    int a;
29
  };
30
  {
31
    struct Bar3 {         // { dg-warning "shadows a previous local" }
32
      int a;
33
    };
34
    char Bar4;            // { dg-bogus "shadows a previous local" }
35
    int My_Num;           // { dg-warning "shadows a previous local" }
36
  }
37
}

powered by: WebSVN 2.1.0

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