Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/c-c++-common/Wtautological-compare-3.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* { dg-do compile } */ | |
2 /* { dg-options "-Wtautological-compare" } */ | |
3 /* Test we don't warn for floats. */ | |
4 | |
5 struct S { double d; float f; }; | |
6 | |
7 void | |
8 fn1 (int i, float f, double d, struct S *s, float *fp) | |
9 { | |
10 if (f == f); | |
11 if (f != f); | |
12 if (d == d); | |
13 if (d != d); | |
14 if (fp[i] == fp[i]); | |
15 if (fp[i] != fp[i]); | |
16 if (s->f == s->f); | |
17 if (s->f != s->f); | |
18 if (s->d == s->d); | |
19 if (s->d != s->d); | |
20 } |