[Bug c++/43612] Double exception not caught if only float is present in exception
korikov at hotmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Apr 1 01:10:00 GMT 2010
------- 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
More information about the Gcc-bugs
mailing list