Debian Codegraph @

gcc/testsuite/g++.dg/warn/Wextra-2.C

raw
1 // { dg-options "-Wextra" }
2
3 struct S {
4 S();
5 };
6
7 struct T {
8 private:
9 int i;
10 public:
11 // There should be no warning about this data member because the
12 // default constructor for "T" will invoke the default constructor
13 // for "S", even though "S" is "const".
14 const S s; // { dg-bogus "const" }
15 };