problem while detecting floating point operations

1 view
Skip to first unread message

alex

unread,
Dec 19, 2006, 5:19:23 AM12/19/06
to programming.lang.c++.sources
hi friends ...

i am facing a problem while detecting floating point operations in my
project, please help me.

i want to find out the places in my C/C++ project where i am doing
floating point operations.
As it is a big project it is not possible to check every line manually,
so is there any other method
to detect floating point operations in my project?


I just compiled the project with option '-msoft-float', it is reporting
errors at the places where 'float' variables are being used. But it is
not reporting any error for the places where we are using floating
literals ...
to make myself clear,i would give an example code snippet,

example:

//first case

float x;

printf("%f",x); // here it is reporting an error because we are
trying to use the variable (float) x;

//in second case

int y;

y = 4.5 * 2.5; // here it is not reporting any error .

what should have to be done to detect these kind of operations
also.

library: GCC 3.4.3
kernel: 2.6.9


Thanks in advance

Reply all
Reply to author
Forward
0 new messages