[Bug c++/41060] Wconversion Ignores static_cast

redi at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Aug 14 09:51:00 GMT 2009



------- Comment #1 from redi at gcc dot gnu dot org  2009-08-14 09:51 -------
Do you have a testcase?

I tried this and static_cast behaves the same as the C-style cast:

int i1 = 0.5;
int i2 = (int)0.5;
int i3 = static_cast<int>(0.5);

Only the first line gives a warning.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41060



More information about the Gcc-bugs mailing list