| 1 |
// RUN: %clang_cc1 -verify -pedantic -std=c99 %s |
| 2 |
|
| 3 |
void func(void) { |
| 4 |
_Complex float cf; |
| 5 |
_Complex double cd; |
| 6 |
_Complex long double cld; |
| 7 |
|
| 8 |
++cf; // expected-warning {{'++' on an object of complex type is a C2y extension}} |
| 9 |
++cd; // expected-warning {{'++' on an object of complex type is a C2y extension}} |
| 10 |
++cld; // expected-warning {{'++' on an object of complex type is a C2y extension}} |
| 11 |
|
| 12 |
--cf; // expected-warning {{'--' on an object of complex type is a C2y extension}} |
| 13 |
--cd; // expected-warning {{'--' on an object of complex type is a C2y extension}} |
| 14 |
--cld; // expected-warning {{'--' on an object of complex type is a C2y extension}} |
| 15 |
|
| 16 |
cf++; // expected-warning {{'++' on an object of complex type is a C2y extension}} |
| 17 |
cd++; // expected-warning {{'++' on an object of complex type is a C2y extension}} |
| 18 |
cld++; // expected-warning {{'++' on an object of complex type is a C2y extension}} |
| 19 |
|
| 20 |
cf--; // expected-warning {{'--' on an object of complex type is a C2y extension}} |
| 21 |
cd--; // expected-warning {{'--' on an object of complex type is a C2y extension}} |
| 22 |
cld--; // expected-warning {{'--' on an object of complex type is a C2y extension}} |
| 23 |
} |
| 24 |
|