gcc/testsuite/gcc.dg/pr98029.c
raw| 1 | /* pr98029 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-Wunused" } */ |
| 4 | |
| 5 | double f2 (void) |
| 6 | { |
| 7 | volatile double d; |
| 8 | int i; |
| 9 | |
| 10 | for (d = 2.0, i = 0; i < 5; i++, d *= d) /* { dg-bogus "right-hand operand of comma expression has no effect" } */ |
| 11 | ; |
| 12 | |
| 13 | return d; |
| 14 | } |
| 15 | |
| 16 | int g(void) |
| 17 | { |
| 18 | volatile int x; |
| 19 | (x = 1, (void)1); /* { dg-bogus "right-hand operand of comma expression has no effect" } */ |
| 20 | return x; |
| 21 | } |