digitalmars.D.bugs - [Bug 59] New: implicit conversion from integer to cfloat not caught by the compiler
- d-bugmail puremagic.com (23/23) Mar 20 2006 http://d.puremagic.com/bugzilla/show_bug.cgi?id=59
- d-bugmail puremagic.com (8/8) May 18 2006 http://d.puremagic.com/bugzilla/show_bug.cgi?id=59
- Thomas Kuehne (13/15) May 19 2006 -----BEGIN PGP SIGNED MESSAGE-----
http://d.puremagic.com/bugzilla/show_bug.cgi?id=59
Summary: implicit conversion from integer to cfloat not caught by
the compiler
Product: D
Version: 0.150
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla digitalmars.com
ReportedBy: thomas-dloop kuehne.cn
cfloat c;
c = 0.0; // should fail to compile
test cases:
http://dstress.kuehne.cn/nocompile/c/cfloat_10_A.d
http://dstress.kuehne.cn/nocompile/c/cfloat_10_B.d
http://dstress.kuehne.cn/nocompile/c/cdouble_10_A.d
http://dstress.kuehne.cn/nocompile/c/cdouble_10_B.d
http://dstress.kuehne.cn/nocompile/c/creal_35_A.d
http://dstress.kuehne.cn/nocompile/c/creal_35_B.d
--
Mar 20 2006
http://d.puremagic.com/bugzilla/show_bug.cgi?id=59
smjg iname.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |smjg iname.com
Make up your mind - are we talking about integers or floating points here?
--
May 18 2006
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 d-bugmail puremagic.com schrieb am 2006-05-18:Make up your mind - are we talking about integers or floating points here?Thanks for catching this. In contrast to the documentation the compiler allows implicity promoting integers to complex floats. creal c = 1; // should fail to compile Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFEbbmB3w+/yD4P9tIRAp86AJ9XbD108t6opHbrTJjOv88wE4N32ACdHl3S xU7VhImJz6VmHfKI7biZS20= =A6n7 -----END PGP SIGNATURE-----
May 19 2006








Thomas Kuehne <thomas-dloop kuehne.cn>