summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/stmtexpr2.C
blob: ef29b43c59f9f59468d152c100ebeaef743013f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin: PR c++/36408
// { dg-options "" }
// { dg-do compile }

template<int>
void
foo()
{
  int i = ({ }); // { dg-error "void value not ignored" }
}

template<int>
void
bar()
{
  int i = ({ ({}); }); // { dg-error "void value not ignored" }
}

int
main ()
{
  foo<0> ();
  bar<0> ();
}