------- Comment #2 from korikov at hotmail dot com 2010-04-01 01:09 ------- (In reply to comment #1) > 100.0 is of a type double in C++, not float. Try 100.0f. >
yes 100.0f works as well as (float)100.0 but the point is when the compiler does automatic conversion from float to double, then why not in this case too for exception handling also. I mean treat catch(float x) as catch(double x) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43612