@@ -93,7 +93,7 @@ struct A;
9393void f () {
9494 constexpr A* a = nullptr ;
9595 constexpr int p = &*a;
96- // expected -error@-1 {{cannot initialize a variable of type 'const int' with an rvalue of type 'A *'}}
96+ // since-cxx11 -error@-1 {{cannot initialize a variable of type 'const int' with an rvalue of type 'A *'}}
9797 constexpr A *p2 = &*a;
9898}
9999
@@ -108,27 +108,27 @@ namespace cwg1460 { // cwg1460: 3.5
108108 namespace DRExample {
109109 union A {
110110 union {};
111- // expected -error@-1 {{declaration does not declare anything}}
111+ // since-cxx11 -error@-1 {{declaration does not declare anything}}
112112 union {};
113- // expected -error@-1 {{declaration does not declare anything}}
113+ // since-cxx11 -error@-1 {{declaration does not declare anything}}
114114 constexpr A () {}
115115 };
116116 constexpr A a = A();
117117
118118 union B {
119119 union {};
120- // expected -error@-1 {{declaration does not declare anything}}
120+ // since-cxx11 -error@-1 {{declaration does not declare anything}}
121121 union {};
122- // expected -error@-1 {{declaration does not declare anything}}
122+ // since-cxx11 -error@-1 {{declaration does not declare anything}}
123123 constexpr B () = default ;
124124 };
125125 constexpr B b = B();
126126
127127 union C {
128128 union {};
129- // expected -error@-1 {{declaration does not declare anything}}
129+ // since-cxx11 -error@-1 {{declaration does not declare anything}}
130130 union {};
131- // expected -error@-1 {{declaration does not declare anything}}
131+ // since-cxx11 -error@-1 {{declaration does not declare anything}}
132132 };
133133 constexpr C c = C();
134134#if __cplusplus >= 201403L
@@ -141,7 +141,7 @@ namespace cwg1460 { // cwg1460: 3.5
141141 union B { int n; }; // #cwg1460-B
142142 union C { int n = 0 ; };
143143 struct D { union {}; };
144- // expected -error@-1 {{declaration does not declare anything}}
144+ // since-cxx11 -error@-1 {{declaration does not declare anything}}
145145 struct E { union { int n; }; }; // #cwg1460-E
146146 struct F { union { int n = 0 ; }; };
147147
@@ -173,7 +173,7 @@ namespace cwg1460 { // cwg1460: 3.5
173173 // cxx11-17-error@-1 {{defaulted definition of default constructor cannot be marked constexpr}}
174174 union C { int n = 0 ; constexpr C () = default ; };
175175 struct D { union {}; constexpr D () = default; };
176- // expected -error@-1 {{declaration does not declare anything}}
176+ // since-cxx11 -error@-1 {{declaration does not declare anything}}
177177 struct E { union { int n; }; constexpr E () = default; };
178178 // cxx11-17-error@-1 {{defaulted definition of default constructor cannot be marked constexpr}}
179179 struct F { union { int n = 0 ; }; constexpr F () = default; };
@@ -222,25 +222,25 @@ namespace cwg1460 { // cwg1460: 3.5
222222 union G {
223223 int a = 0 ; // #cwg1460-G-a
224224 int b = 0 ;
225- // expected -error@-1 {{initializing multiple members of union}}
226- // expected -note@#cwg1460-G-a {{previous initialization is here}}
225+ // since-cxx11 -error@-1 {{initializing multiple members of union}}
226+ // since-cxx11 -note@#cwg1460-G-a {{previous initialization is here}}
227227 };
228228 union H {
229229 union {
230230 int a = 0 ; // #cwg1460-H-a
231231 };
232232 union {
233233 int b = 0 ;
234- // expected -error@-1 {{initializing multiple members of union}}
235- // expected -note@#cwg1460-H-a {{previous initialization is here}}
234+ // since-cxx11 -error@-1 {{initializing multiple members of union}}
235+ // since-cxx11 -note@#cwg1460-H-a {{previous initialization is here}}
236236 };
237237 };
238238 struct I {
239239 union {
240240 int a = 0 ; // #cwg1460-I-a
241241 int b = 0 ;
242- // expected -error@-1 {{initializing multiple members of union}}
243- // expected -note@#cwg1460-I-a {{previous initialization is here}}
242+ // since-cxx11 -error@-1 {{initializing multiple members of union}}
243+ // since-cxx11 -note@#cwg1460-I-a {{previous initialization is here}}
244244 };
245245 };
246246 struct J {
@@ -264,23 +264,23 @@ namespace cwg1460 { // cwg1460: 3.5
264264 };
265265 static_assert (B().a == 1 , " " );
266266 static_assert (B().b == 2 , " " );
267- // expected -error@-1 {{static assertion expression is not an integral constant expression}}
268- // expected -note@-2 {{read of member 'b' of union with active member 'a' is not allowed in a constant expression}}
267+ // since-cxx11 -error@-1 {{static assertion expression is not an integral constant expression}}
268+ // since-cxx11 -note@-2 {{read of member 'b' of union with active member 'a' is not allowed in a constant expression}}
269269 static_assert (B(' x' ).a == 0 , " " );
270- // expected -error@-1 {{static assertion expression is not an integral constant expression}}
271- // expected -note@-2 {{read of member 'a' of union with active member 'b' is not allowed in a constant expression}}
270+ // since-cxx11 -error@-1 {{static assertion expression is not an integral constant expression}}
271+ // since-cxx11 -note@-2 {{read of member 'a' of union with active member 'b' is not allowed in a constant expression}}
272272 static_assert (B(' x' ).b == 4 , " " );
273273 static_assert (B(123 ).b == 2 , " " );
274- // expected -error@-1 {{static assertion expression is not an integral constant expression}}
275- // expected -note@-2 {{read of member 'b' of union with active member 'c' is not allowed in a constant expression}}
274+ // since-cxx11 -error@-1 {{static assertion expression is not an integral constant expression}}
275+ // since-cxx11 -note@-2 {{read of member 'b' of union with active member 'c' is not allowed in a constant expression}}
276276 static_assert (B(123 ).c == 3 , " " );
277277 static_assert (B(" " ).a == 1 , " " );
278- // expected -error@-1 {{static assertion expression is not an integral constant expression}}
279- // expected -note@-2 {{read of member 'a' of union with active member 'b' is not allowed in a constant expression}}
278+ // since-cxx11 -error@-1 {{static assertion expression is not an integral constant expression}}
279+ // since-cxx11 -note@-2 {{read of member 'a' of union with active member 'b' is not allowed in a constant expression}}
280280 static_assert (B(" " ).b == 2 , " " );
281281 static_assert (B(" " ).c == 3 , " " );
282- // expected -error@-1 {{static assertion expression is not an integral constant expression}}
283- // expected -note@-2 {{read of member 'c' of union with active member 'b' is not allowed in a constant expression}}
282+ // since-cxx11 -error@-1 {{static assertion expression is not an integral constant expression}}
283+ // since-cxx11 -note@-2 {{read of member 'c' of union with active member 'b' is not allowed in a constant expression}}
284284
285285 struct C {
286286 union { int a, b = 2 , c; };
@@ -294,54 +294,54 @@ namespace cwg1460 { // cwg1460: 3.5
294294
295295 static_assert (C().a == 1 , " " );
296296 static_assert (C().b == 2 , " " );
297- // expected -error@-1 {{static assertion expression is not an integral constant expression}}
298- // expected -note@-2 {{read of member 'b' of union with active member 'a' is not allowed in a constant expression}}
297+ // since-cxx11 -error@-1 {{static assertion expression is not an integral constant expression}}
298+ // since-cxx11 -note@-2 {{read of member 'b' of union with active member 'a' is not allowed in a constant expression}}
299299 static_assert (C().d == 4 , " " );
300- // expected -error@-1 {{static assertion expression is not an integral constant expression}}
301- // expected -note@-2 {{read of member 'd' of union with active member 'e' is not allowed in a constant expression}}
300+ // since-cxx11 -error@-1 {{static assertion expression is not an integral constant expression}}
301+ // since-cxx11 -note@-2 {{read of member 'd' of union with active member 'e' is not allowed in a constant expression}}
302302 static_assert (C().e == 5 , " " );
303303
304304 static_assert (C(' x' ).b == 2 , " " );
305- // expected -error@-1 {{static assertion expression is not an integral constant expression}}
306- // expected -note@-2 {{read of member 'b' of union with active member 'c' is not allowed in a constant expression}}
305+ // since-cxx11 -error@-1 {{static assertion expression is not an integral constant expression}}
306+ // since-cxx11 -note@-2 {{read of member 'b' of union with active member 'c' is not allowed in a constant expression}}
307307 static_assert (C(' x' ).c == 3 , " " );
308308 static_assert (C(' x' ).d == 4 , " " );
309- // expected -error@-1 {{static assertion expression is not an integral constant expression}}
310- // expected -note@-2 {{read of member 'd' of union with active member 'e' is not allowed in a constant expression}}
309+ // since-cxx11 -error@-1 {{static assertion expression is not an integral constant expression}}
310+ // since-cxx11 -note@-2 {{read of member 'd' of union with active member 'e' is not allowed in a constant expression}}
311311 static_assert (C(' x' ).e == 5 , " " );
312312
313313 static_assert (C(1 ).b == 2 , " " );
314314 static_assert (C(1 ).c == 3 , " " );
315- // expected -error@-1 {{static assertion expression is not an integral constant expression}}
316- // expected -note@-2 {{read of member 'c' of union with active member 'b' is not allowed in a constant expression}}
315+ // since-cxx11 -error@-1 {{static assertion expression is not an integral constant expression}}
316+ // since-cxx11 -note@-2 {{read of member 'c' of union with active member 'b' is not allowed in a constant expression}}
317317 static_assert (C(1 ).d == 4 , " " );
318318 static_assert (C(1 ).e == 5 , " " );
319- // expected -error@-1 {{static assertion expression is not an integral constant expression}}
320- // expected -note@-2 {{read of member 'e' of union with active member 'd' is not allowed in a constant expression}}
319+ // since-cxx11 -error@-1 {{static assertion expression is not an integral constant expression}}
320+ // since-cxx11 -note@-2 {{read of member 'e' of union with active member 'd' is not allowed in a constant expression}}
321321
322322 static_assert (C(1 .f).b == 2 , " " );
323323 static_assert (C(1 .f).c == 3 , " " );
324- // expected -error@-1 {{static assertion expression is not an integral constant expression}}
325- // expected -note@-2 {{read of member 'c' of union with active member 'b' is not allowed in a constant expression}}
324+ // since-cxx11 -error@-1 {{static assertion expression is not an integral constant expression}}
325+ // since-cxx11 -note@-2 {{read of member 'c' of union with active member 'b' is not allowed in a constant expression}}
326326 static_assert (C(1 .f).e == 5 , " " );
327- // expected -error@-1 {{static assertion expression is not an integral constant expression}}
328- // expected -note@-2 {{read of member 'e' of union with active member 'f' is not allowed in a constant expression}}
327+ // since-cxx11 -error@-1 {{static assertion expression is not an integral constant expression}}
328+ // since-cxx11 -note@-2 {{read of member 'e' of union with active member 'f' is not allowed in a constant expression}}
329329 static_assert (C(1 .f).f == 6 , " " );
330330
331331 static_assert (C(" " ).a == 1 , " " );
332- // expected -error@-1 {{static assertion expression is not an integral constant expression}}
333- // expected -note@-2 {{read of member 'a' of union with active member 'b' is not allowed in a constant expression}}
332+ // since-cxx11 -error@-1 {{static assertion expression is not an integral constant expression}}
333+ // since-cxx11 -note@-2 {{read of member 'a' of union with active member 'b' is not allowed in a constant expression}}
334334 static_assert (C(" " ).b == 2 , " " );
335335 static_assert (C(" " ).c == 3 , " " );
336- // expected -error@-1 {{static assertion expression is not an integral constant expression}}
337- // expected -note@-2 {{read of member 'c' of union with active member 'b' is not allowed in a constant expression}}
336+ // since-cxx11 -error@-1 {{static assertion expression is not an integral constant expression}}
337+ // since-cxx11 -note@-2 {{read of member 'c' of union with active member 'b' is not allowed in a constant expression}}
338338 static_assert (C(" " ).d == 4 , " " );
339- // expected -error@-1 {{static assertion expression is not an integral constant expression}}
340- // expected -note@-2 {{read of member 'd' of union with active member 'e' is not allowed in a constant expression}}
339+ // since-cxx11 -error@-1 {{static assertion expression is not an integral constant expression}}
340+ // since-cxx11 -note@-2 {{read of member 'd' of union with active member 'e' is not allowed in a constant expression}}
341341 static_assert (C(" " ).e == 5 , " " );
342342 static_assert (C(" " ).f == 6 , " " );
343- // expected -error@-1 {{static assertion expression is not an integral constant expression}}
344- // expected -note@-2 {{read of member 'f' of union with active member 'e' is not allowed in a constant expression}}
343+ // since-cxx11 -error@-1 {{static assertion expression is not an integral constant expression}}
344+ // since-cxx11 -note@-2 {{read of member 'f' of union with active member 'e' is not allowed in a constant expression}}
345345
346346 struct D ;
347347 extern const D d;
0 commit comments