Thread overview | |||||
---|---|---|---|---|---|
|
March 20, 2006 [Bug 59] New: implicit conversion from integer to cfloat not caught by the compiler | ||||
---|---|---|---|---|
| ||||
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 -- |
May 18, 2006 [Bug 59] implicit conversion from integer to cfloat not caught by the compiler | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/bugzilla/show_bug.cgi?id=59 smjg@iname.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |smjg@iname.com ------- Comment #1 from smjg@iname.com 2006-05-18 08:54 ------- Make up your mind - are we talking about integers or floating points here? -- |
May 19, 2006 Re: [Bug 59] implicit conversion from integer to cfloat not caught by the compiler | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail Attachments: | d-bugmail@puremagic.com schrieb am 2006-05-18:
> ------- Comment #1 from smjg@iname.com 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
|
Copyright © 1999-2021 by the D Language Foundation