Daily bump.
[gcc.git] / gcc / testsuite / g++.dg / warn / Wsequence-point-pr18050.C
blob63aecd0f3ed0b34fe84033b7d9c9ae0dbb51cfe7
1 /* PR 18050 : bogus warning with -Wsequence-point */
2 /* { dg-do compile } */
3 /* { dg-options "-Wsequence-point" } */
5 struct x
7   int i;
8 };
9 void bar(struct x*, int *);
11 void foo(struct x *y)
13   bar(y++, &y->i); /* { dg-warning "operation on 'y' may be undefined" } */
16 void zz(int a, int *b)
18   *b = a;
21 void baz(void) {
22   int a = 5;
23   zz(++a, &a);  /* { dg-bogus "operation on 'a' may be undefined" } */