Debian Codegraph @

gcc/testsuite/g++.dg/cpp1z/nodiscard2.C

raw
1 // { dg-do compile { target c++11 } }
2
3 struct [[nodiscard]] A { }; // { dg-message "" }
4
5 A f(); // { dg-message "" }
6
7 int main()
8 {
9 f(); // { dg-warning "Wunused-result" }
10 }