gcc/testsuite/c-c++-common/Wsequence-point-1.c
raw| 1 | /* PR c++/57274 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-Wsequence-point" } */ |
| 4 | |
| 5 | void foo (int, int); |
| 6 | |
| 7 | void |
| 8 | bar (int *x) |
| 9 | { |
| 10 | foo (*x++, sizeof (*x)); /* { dg-bogus "may be undefined" } */ |
| 11 | } |
| 12 | |
| 13 | void |
| 14 | baz (int *x) |
| 15 | { |
| 16 | foo (*x, sizeof (*x++) + sizeof (*x++)); /* { dg-bogus "may be undefined" } */ |
| 17 | } |