You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cxx-note {{default constructor of 'W' is implicitly deleted because field 'j' of const-qualified type 'const int' would not be initialized}}
16
18
17
19
voidf() {
18
20
structSs1; // unsafe-warning {{default initialization of an object of type 'struct S' with const member leaves the object uninitialized and is incompatible with C++}} \
@@ -34,6 +36,12 @@ void x() {
34
36
structVv2= { 0 };
35
37
structVv3= { 0, { 0 } };
36
38
}
39
+
voidy() {
40
+
structWw1; // unsafe-warning {{default initialization of an object of type 'struct W' with const member leaves the object uninitialized and is incompatible with C++}} \
41
+
cxx-error {{call to implicitly-deleted default constructor of 'struct W'}}
42
+
structWw2= { 0 };
43
+
structWw3= { { 0 }, 0 };
44
+
}
37
45
38
46
// Test a tentative definition which does eventually get an initializer.
0 commit comments