Debian Codegraph @

gcc/testsuite/g++.dg/diagnostic/disable.C

raw
1 // { dg-options "-Wtemplates -Wmultiple-inheritance -Wvirtual-inheritance -Wnamespaces" }
2 // { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
3
4 #define _GLIBCXX_SYSHDR
5 #include <iostream>
6 #include <algorithm>
7
8 namespace foo { } // { dg-warning "namespace" }
9
10 template <typename X> X Foo (); // { dg-warning "template" }
11
12 struct B1 {};
13 struct B2 {};
14 struct V {};
15
16 struct D : B1, B2 {}; // { dg-warning "multiple" }
17
18 struct E : virtual V {}; // { dg-warning "virtual" }
19
20 struct F1 : E {};
21
22 struct F2 : D {};
23
24 void Baz (int a, int b)
25 {
26 std::swap (a, b);
27 }
28
29