brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 4c780da Raw
25 lines · c
1// RUN: %clang_cc1 -verify -pedantic -std=c99 %s2 3void 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 25