1/* PR 18050 : bogus warning with -Wsequence-point */
2/* { dg-do compile } */
3/* { dg-options "-Wsequence-point" } */
4
5struct x
6{
7  int i;
8};
9void bar(struct x*, int *);
10
11void foo(struct x *y)
12{
13  bar(y++, &y->i); /* { dg-warning "operation on 'y' may be undefined" } */
14}
15
16void zz(int a, int *b)
17{
18  *b = a;
19}
20
21void baz(void) {
22  int a = 5;
23  zz(++a, &a);  /* { dg-bogus "operation on 'a' may be undefined" } */
24}
25