floating-point-compare.c revision 6a261551023f8eebc6abd64054e1b9d16615f3d4
1// RUN: clang -fsyntax-only -verify %s
2
3int foo(float x, float y) {
4  return x == y; // expected-warning {{comparing floating point with ==}}
5}
6
7int bar(float x, float y) {
8  return x != y; // expected-warning {{comparing floating point with ==}}
9}
10
11int qux(float x) {
12  return x == x; // no-warning
13}
14