PR lto/84212 - -Wno-* does not disable warnings from -flto link stage
[official-gcc.git] / gcc / testsuite / g++.dg / warn / Wshadow-4.C
blobc033028d727fa49bf2567cf9b9bd3d5fe2a3d2ab
1 // PR c++/39526
2 // { dg-options "-Wshadow" }
4 class INetURLObject
6 public:
7     INetURLObject(int i);
8     int GetMainURL() const;
9 };
11 int foo(int infoo)              // { dg-bogus "shadowed declaration" }
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-bogus "shadows a parameter" }
18   };
19   return outfoo;
22 // PR c++/39763
23 int foo2(void)
25     int infoo = 0;              // { dg-bogus "shadowed declaration" }
26     int outfoo( INetURLObject( infoo ).GetMainURL()); // { dg-bogus "shadows" }
27     struct A
28     {
29       void f(int infoo) { }     // { dg-bogus "shadows a previous local" }
30     };
31     return outfoo;