This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/41060] Wconversion Ignores static_cast



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]