aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/Wsequence-point-2.c
blob: 1e85e273e34ba514fb7c9c9f811daa1701a9fe8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* PR c/69661 - missing -Wsequence-point warning
   { dg-do compile }
   { dg-options "-Wall" } */

int a, b;
short c;

void fn1 (int p) { (void)p; }

void fn2 (void)
{
  fn1(a == (c &= a = b));   /* { dg-warning "\\\[-Wsequence-point\\\]" } */
}