Files
codeql/cpp/ql/test/library-tests/cast_specifiers/cast_specifiers.c
2018-08-02 17:53:23 +01:00

15 lines
472 B
C

// Compilable with:
// gcc -c cast_specifiers.c
void f(void) {
int x = 3;
x = x;
x = (int)x;
x = (const long)x; // [MISSING: 'const', 'volatile' specifiers on casts on lines 8 .. 12]
x = (volatile int)x; // [MISSING: implicit cast back to int]
x = (const int)x; // [MISSING: implicit cast back to int]
x = (const volatile int)x; // [MISSING: implicit cast back to int]
x = (volatile const int)x; // [MISSING: implicit cast back to int]
}