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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc3/] [gcc/] [testsuite/] [g++.dg/] [warn/] [Wshadow-4.C] - Blame information for rev 839

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

Line No. Rev Author Line
1 301 jeremybenn
// PR c++/39526
2
// { dg-options "-Wshadow" }
3
 
4
class INetURLObject
5
{
6
public:
7
    INetURLObject(int i);
8
    int GetMainURL() const;
9
};
10
 
11
int foo(int infoo)              // { dg-warning "shadowed declaration" }
12
{
13
  int outfoo( INetURLObject( infoo ).GetMainURL()); // { dg-bogus "shadows" }
14
  extern void f(int infoo);
15
  struct A
16
  {
17
    void f(int infoo) { }       // { dg-warning "shadows a parameter" }
18
  };
19
  return outfoo;
20
}
21
 
22
// PR c++/39763
23
int foo2(void)
24
{
25
    int infoo = 0;              // { dg-warning "shadowed declaration" }
26
    int outfoo( INetURLObject( infoo ).GetMainURL()); // { dg-bogus "shadows" }
27
    struct A
28
    {
29
      void f(int infoo) { }     // { dg-warning "shadows a previous local" }
30
    };
31
    return outfoo;
32
}

powered by: WebSVN 2.1.0

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