comparison gcc/testsuite/g++.dg/warn/Wfloat-equal-1.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
2 /* { dg-do compile } */ 2 /* { dg-do compile } */
3 /* { dg-options "-Wfloat-equal" } */ 3 /* { dg-options "-Wfloat-equal" } */
4 4
5 double a, b; 5 double a, b;
6 _Complex double c, d; 6 _Complex double c, d;
7 int f(void) { return a == b; } /* { dg-warning "comparing floating point" } */ 7 int f(void) { return a == b; } /* { dg-warning "24:comparing floating-point" } */
8 int g(void) { return c == d; } /* { dg-warning "comparing floating point" } */ 8 int g(void) { return c == d; } /* { dg-warning "24:comparing floating-point" } */
9 int h(void) { return a != b; } /* { dg-warning "comparing floating point" } */ 9 int h(void) { return a != b; } /* { dg-warning "24:comparing floating-point" } */
10 int i(void) { return c != d; } /* { dg-warning "comparing floating point" } */ 10 int i(void) { return c != d; } /* { dg-warning "24:comparing floating-point" } */