digitalmars.D.bugs - bug, pointers and boolean expressions
- Tintor Marko (9/9) Mar 13 2005 code (equalR returns bool)
- =?ISO-8859-15?Q?Thomas_K=FChne?= (23/23) Mar 13 2005 -----BEGIN PGP SIGNED MESSAGE-----
code (equalR returns bool)
-----
bool equal(X* a, X* b)
{
return (!a || !b) ? !a && !b : equalR(a,b);
}
-----
DMD 0.116 WIN32: cannot implicitly convert expression (!a || !b ? !a && !b
: cast(int)(equalR(a,b))) of type int to bit
Mar 13 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Tintor Marko wrote:
| code (equalR returns bool)
| -----
| bool equal(X* a, X* b)
| {
| return (!a || !b) ? !a && !b : equalR(a,b);
| }
| -----
|
| DMD 0.116 WIN32: cannot implicitly convert expression (!a || !b ? !a
| && !b : cast(int)(equalR(a,b))) of type int to bit
Added to DStress as
http://dstress.kuehne.cn/run/cast_20.d
http://dstress.kuehne.cn/run/cast_21.d
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)
iD8DBQFCNSqj3w+/yD4P9tIRAkv8AKCh7lq2cuK5vG5AlZRav4zgvivH9ACghFDi
apwlswBsTnSp6V3/ezPPGWM=
=xd71
-----END PGP SIGNATURE-----
Mar 13 2005








=?ISO-8859-15?Q?Thomas_K=FChne?=