annotate gcc/testsuite/g++.dg/cpp0x/missing-initializer_list-include.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* This is padding (to avoid the generated patch containing DejaGnu
kono
parents:
diff changeset
2 directives). */
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 /* { dg-options "-fdiagnostics-generate-patch" } */
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 // { dg-do compile { target c++11 } }
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 void test (int i)
kono
parents:
diff changeset
9 {
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
10 auto a = { &i }; // { dg-error "deducing from brace-enclosed initializer list requires '#include <initializer_list>'" }
111
kono
parents:
diff changeset
11 }
kono
parents:
diff changeset
12
kono
parents:
diff changeset
13 /* Verify the output from -fdiagnostics-generate-patch.
kono
parents:
diff changeset
14 We expect the patch to begin with a header, containing this
kono
parents:
diff changeset
15 source filename, via an absolute path.
kono
parents:
diff changeset
16 Given the path, we can only capture it via regexps. */
kono
parents:
diff changeset
17 /* { dg-regexp "\\-\\-\\- .*" } */
kono
parents:
diff changeset
18 /* { dg-regexp "\\+\\+\\+ .*" } */
kono
parents:
diff changeset
19 /* Use #if 0/#endif rather than comments, to allow the text to contain
kono
parents:
diff changeset
20 a comment. */
kono
parents:
diff changeset
21 #if 0
kono
parents:
diff changeset
22 { dg-begin-multiline-output "" }
kono
parents:
diff changeset
23 @@ -1,3 +1,4 @@
kono
parents:
diff changeset
24 +#include <initializer_list>
kono
parents:
diff changeset
25 /* This is padding (to avoid the generated patch containing DejaGnu
kono
parents:
diff changeset
26 directives). */
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
27
111
kono
parents:
diff changeset
28 { dg-end-multiline-output "" }
kono
parents:
diff changeset
29 #endif