gcc/testsuite/g++.dg/warn/Wuninitialized-16.C
raw| 1 | // PR c++/19808 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | // { dg-options "-Wuninitialized" } |
| 4 | |
| 5 | struct S { |
| 6 | int a; |
| 7 | int b; |
| 8 | int c; |
| 9 | S() : a((b = 42)), c(b) { } |
| 10 | S(int) : a(((1, b) = 42)), c(b) { } |
| 11 | S(char) : a(((c++, b) = 42)), c(b) { } // "field .S::c. is used uninitialized" but too complex for the FE |
| 12 | }; |