------- Comment #1 from siegerstein at pochta dot ru 2007-08-25 05:04 ------- Check this.
#include <iostream> int main() { std::cout << "******* to float ********" << std::endl; std::cout << 8 / 5 << std::endl; std::cout << (float) 8 / 5 << std::endl; std::cout << float (8 / 5) << std::endl; std::cout << (float) (8 / 5) << std::endl; std::cout << "******* to int ********" << std::endl; std::cout << 8.0 / 5.0 << std::endl; std::cout << (int) 8.0 / 5.0 << std::endl; std::cout << int (8.0 / 5.0) << std::endl; std::cout << (int) (8.0 / 5.0) << std::endl; return 0; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33182