Debian Codegraph @

gcc/testsuite/g++.dg/template/stmtexpr2.C

raw
1 // Contributed by Dodji Seketeli <[email protected]>
2 // Origin: PR c++/36408
3 // { dg-options "" }
4 // { dg-do compile }
5
6 template<int>
7 void
8 foo()
9 {
10 int i = ({ }); // { dg-error "void value not ignored" }
11 }
12
13 template<int>
14 void
15 bar()
16 {
17 int i = ({ ({}); }); // { dg-error "void value not ignored" }
18 }
19
20 int
21 main ()
22 {
23 foo<0> ();
24 bar<0> ();
25 }
26