Mercurial > projects > ldc
diff dmd/parse.c @ 1165:226c07c71967
This should fix integers below 64 bit on big-endian systems.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Sun, 29 Mar 2009 01:29:30 +0100 |
parents | b30fe7e1dbb9 |
children | e961851fb8be |
line wrap: on
line diff
--- a/dmd/parse.c Sat Mar 28 21:10:53 2009 +0100 +++ b/dmd/parse.c Sun Mar 29 01:29:30 2009 +0100 @@ -3985,12 +3985,12 @@ break; case TOKint32v: - e = new IntegerExp(loc, token.int32value, Type::tint32); + e = new IntegerExp(loc, (d_int32)token.int64value, Type::tint32); nextToken(); break; case TOKuns32v: - e = new IntegerExp(loc, token.uns32value, Type::tuns32); + e = new IntegerExp(loc, (d_uns32)token.uns64value, Type::tuns32); nextToken(); break; @@ -4064,17 +4064,17 @@ break; case TOKcharv: - e = new IntegerExp(loc, token.uns32value, Type::tchar); + e = new IntegerExp(loc, (d_uns8)token.uns64value, Type::tchar); nextToken(); break; case TOKwcharv: - e = new IntegerExp(loc, token.uns32value, Type::twchar); + e = new IntegerExp(loc, (d_uns16)token.uns64value, Type::twchar); nextToken(); break; case TOKdcharv: - e = new IntegerExp(loc, token.uns32value, Type::tdchar); + e = new IntegerExp(loc, (d_uns32)token.uns64value, Type::tdchar); nextToken(); break;