gcc/testsuite/g++.dg/warn/Wunused-14.C
raw| 1 | // Test that -Wunused should not emit a warning on the initialization of |
| 2 | // non-POD arrays. See PR c++/39803. |
| 3 | // { dg-do compile } |
| 4 | // { dg-options "-Wunused" } |
| 5 | |
| 6 | #include <utility> |
| 7 | |
| 8 | using std::pair; |
| 9 | |
| 10 | int foo() { |
| 11 | pair<int, const char*> components[3]; // { dg-bogus "value computed is not used" } |
| 12 | components[0].first = 0; |
| 13 | return 0; |
| 14 | } |