# HG changeset patch # User Christian Kamm # Date 1217177560 -7200 # Node ID 1a9bdbd4ac608c7b8d52af1098c505d59078ea5f # Parent 798ee94a0be7fc34784eb9db42d3a87f01a941e7 Make RealEquals only compare the data bytes. Fixes run/t/template_class_13_* regressions introduced in [r401]. diff -r 798ee94a0be7 -r 1a9bdbd4ac60 dmd/expression.c --- a/dmd/expression.c Sun Jul 27 17:53:49 2008 +0200 +++ b/dmd/expression.c Sun Jul 27 18:52:40 2008 +0200 @@ -1498,7 +1498,7 @@ /* In some cases, the REALPAD bytes get garbage in them, * so be sure and ignore them. */ - memcmp(&x1, &x2, sizeof(real_t)) == 0; + memcmp(&x1, &x2, REAL_T_SIZE - REAL_T_PAD) == 0; } int RealExp::equals(Object *o) diff -r 798ee94a0be7 -r 1a9bdbd4ac60 dmd/mars.h --- a/dmd/mars.h Sun Jul 27 17:53:49 2008 +0200 +++ b/dmd/mars.h Sun Jul 27 18:52:40 2008 +0200 @@ -213,6 +213,8 @@ #include "d-gcc-real.h" #else typedef long double real_t; +#define REAL_T_SIZE 12 +#define REAL_T_PAD 2 #endif // Modify OutBuffer::writewchar to write the correct size of wchar