summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/20030612-1.c
blob: 5ecc4c1da894dc657d3a754e6c7551e5b1d23f85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do run } */
/* { dg-options "-O2" } */

int A, B;

void foo()
{
  long x = 3;
  (void)({
    A = B + x + ((1) - 1);
    return;	/* { dg-warning "statement-expressions should end with a non-void expression" } */
  });
}

main()
{
  B = 5;
  foo();
  if (A != 8)
    abort ();
  return 0;
}