This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Strange Warnings
- To: gcc at gcc dot gnu dot org
- Subject: Strange Warnings
- From: Frank Klemm <pfk at fuchs dot offl dot uni-jena dot de>
- Date: Wed, 19 Sep 2001 22:37:58 +0200
- >Received: (from pfk@localhost)by fuchs.offl.uni-jena.de (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) id WAA03873for gcc@gcc.gnu.org; Wed, 19 Sep 2001 22:37:59 +0200
Code --------------------------------------------
#include <math.h>
double TEST_RUN ( unsigned int ms )
{
static float A [1000];
int ret = 0;
size_t i;
ms *= 1000;
while ( ms-- ) {
for ( i = 0; i < 1000; i++ )
ret += (int) floorf (A[i]); <------------
}
return (double) ret;
}
Warning while compiling -------------------------------
test-0003-inc.c: In function 'test_0003_run':
test-0003-inc.c:12: warning: passing arg 1 of 'floorf' as 'float' rather than 'double' due to prototype
test-0003-inc.c:12: warning: cast does not match function type
Remarks ------------------------------------------------
Warning 1 is not very useful, it is so little useful so that it disturbs.
Warning 2 I do not understand.
--
Frank Klemm