Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.dg / template / stmtexpr2.C
blobef29b43c59f9f59468d152c100ebeaef743013f3
1 // Contributed by Dodji Seketeli <dodji@redhat.com>
2 // Origin: PR c++/36408
3 // { dg-options "" }
4 // { dg-do compile }
6 template<int>
7 void
8 foo()
10   int i = ({ }); // { dg-error "void value not ignored" }
13 template<int>
14 void
15 bar()
17   int i = ({ ({}); }); // { dg-error "void value not ignored" }
20 int
21 main ()
23   foo<0> ();
24   bar<0> ();