Files
codeql/cpp/ql/test/query-tests/Likely Bugs/Arithmetic/FloatComparison/c.c
2026-07-07 09:49:50 +01:00

20 lines
235 B
C

static float g(void);
void c_f(void) {
float x, y;
x == 3.0;
3.0 == x;
x == x;
x == y; // $ Alert
g() == 3.0;
3.0 == g();
g() == g(); // $ Alert
x == g(); // $ Alert
g() == x; // $ Alert
}