Hello,
I must be missing something really simple but how does one work
around this :
$ cat demo.c
int main()
{
int k = 375;
double a = 3.75;
k /= a;
return 1;
}
$ g++ demo.c
demo.c: In function `int main()':
demo.c:5: warning: converting to `int' from `double'
whereas the gcc compilation does not raise anything.
Anyone to clear the distinction between gcc behavior and g++ ...
Or at least a way to get rid of this warning, I have trouble
understanding why this code is considered dangerous.
Thanks,
Mathieu
Using: g++ --version
g++ (GCC) 3.3.5 (Debian 1:3.3.5-13)
Can reproduce with g++-4.0 (GCC) 4.0.1 and g++ (GCC) 4.1.0 20050719
_______________________________________________
Help-gplusplus mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gplusplus