PR c++/81917 - ICE with void_t and partial specialization.
[official-gcc.git] / gcc / testsuite / g++.dg / rtti / missing-typeinfo-include.C
blob937c38f11a2a9508490a7192c55e2ae6b4bab994
1 /* This is padding (to avoid the generated patch containing DejaGnu
2    directives).  */
4 /* { dg-options "-fdiagnostics-generate-patch" } */
6 void test()
8   typeid(void); // { dg-error "must '#include <typeinfo>' before using 'typeid'" }
11 /* Verify the output from -fdiagnostics-generate-patch.
12    We expect the patch to begin with a header, containing this
13    source filename, via an absolute path.
14    Given the path, we can only capture it via regexps.  */
15 /* { dg-regexp "\\-\\-\\- .*" } */
16 /* { dg-regexp "\\+\\+\\+ .*" } */
17 /* Use #if 0/#endif rather than comments, to allow the text to contain
18    a comment.  */
19 #if 0
20 { dg-begin-multiline-output "" }
21 @@ -1,3 +1,4 @@
22 +#include <typeinfo>
23  /* This is padding (to avoid the generated patch containing DejaGnu
24     directives).  */
26 { dg-end-multiline-output "" }
27 #endif