Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / warn / Wuninitialized-26.C
bloba887d12e9f961b193037455e1819009c5fbf6f91
1 // PR c++/19808
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-Wuninitialized" }
4 // Anonymous union/struct.
5 // ??? The diagnostic should be improved to say 'b' instead of
6 // "<anonymous>".
8 struct S {
9   __extension__ struct {
10     int a;
11     int b;
12   };
13   S() : a(b) { } // { dg-warning "is used uninitialized" }
16 struct U {
17   union {
18     int a;
19     int b;
20   };
21   U() : a(b) { } // { dg-warning "is used uninitialized" }