Bug 59 – implicit conversion from integer to cfloat not caught by the compiler

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2006-03-20T17:56:00Z
Last change time
2014-02-15T02:09:26Z
Assigned to
bugzilla
Creator
thomas-dloop

Comments

Comment #0 by thomas-dloop — 2006-03-20T17:56:02Z
Comment #1 by smjg — 2006-05-18T08:54:52Z
Make up your mind - are we talking about integers or floating points here?
Comment #2 by thomas-dloop — 2006-05-19T11:45:35Z
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [email protected] schrieb am 2006-05-18: > ------- Comment #1 from [email protected] 2006-05-18 08:54 ------- > 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-----
Comment #3 by bugzilla — 2006-06-20T02:05:54Z
Fixed 0.161