Mercurial > projects > ldc
comparison dmd/expression.c @ 401:62715be72a06
Fix compile-time comparison of template value parameters of real type.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sun, 27 Jul 2008 13:29:31 +0200 |
parents | aaade6ded589 |
children | 1a9bdbd4ac60 |
comparison
equal
deleted
inserted
replaced
400:e6e972c5cc17 | 401:62715be72a06 |
---|---|
1496 { | 1496 { |
1497 return (isnan(x1) && isnan(x2)) || | 1497 return (isnan(x1) && isnan(x2)) || |
1498 /* In some cases, the REALPAD bytes get garbage in them, | 1498 /* In some cases, the REALPAD bytes get garbage in them, |
1499 * so be sure and ignore them. | 1499 * so be sure and ignore them. |
1500 */ | 1500 */ |
1501 memcmp(&x1, &x2, REALSIZE - REALPAD) == 0; | 1501 memcmp(&x1, &x2, sizeof(real_t)) == 0; |
1502 } | 1502 } |
1503 | 1503 |
1504 int RealExp::equals(Object *o) | 1504 int RealExp::equals(Object *o) |
1505 { RealExp *ne; | 1505 { RealExp *ne; |
1506 | 1506 |