summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/stmtexpr10.C
blob: f7c5f8f591f6dba58d6fd0e7b1878c171e5c1cae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile } " */
/* { dg-options "" } */

void foo(int i)
{
  (i ? 1 : 2) = ({ X; }); /* { dg-error "" } */
}

struct A
{
  ~A ();
  void foo()
  {
    delete this = ({ X; }); /* { dg-error "" } */
  }
};