[Bug c++/33182] New: ()
siegerstein at pochta dot ru
gcc-bugzilla@gcc.gnu.org
Sat Aug 25 03:07:00 GMT 2007
1: #include <iostream>
2:
3: int main() {
4: std::cout << (float) 5 / 8 << std::endl; // 0.625
5: std::cout << (float) (5 / 8) << std::endl; // 0
6: std::cout << float (5 / 8) << std::endl; // 0
7:
8: return 0;
9: }
Work only line 4. Why?
--
Summary: ()
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: siegerstein at pochta dot ru
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33182
More information about the Gcc-bugs
mailing list