aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/warn/Wshadow-4.C
blob: 16399b2fb60d44196492e39e8a41f6fc156dc9f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// PR c++/39526
// { dg-options "-Wshadow" }

class INetURLObject
{
public:
    INetURLObject(int i);
    int GetMainURL() const;
};

int foo(int infoo)		// { dg-warning "shadowed declaration" }
{
  int outfoo( INetURLObject( infoo ).GetMainURL()); // { dg-bogus "shadows" }
  extern void f(int infoo);
  struct A
  {
    void f(int infoo) { }	// { dg-warning "shadows a parameter" }
  };
  return outfoo;
}