Specify a large integer constant more portably.

This commit is contained in:
Frits van Bommel
2009-05-17 10:33:21 +02:00
parent 5078019c54
commit a75ddbf803

View File

@@ -11,6 +11,7 @@
#include <fstream>
#include "gen/llvm.h"
#include "llvm/Support/DataTypes.h"
#include "attrib.h"
#include "init.h"
@@ -314,7 +315,7 @@ DValue* RealExp::toElem(IRState* p)
LLConstant* RealExp::toConstElem(IRState* p)
{
Logger::print("RealExp::toConstElem: %s @ %s | %LX\n", toChars(), type->toChars(),
0xFFFFFFFFFFUL & *(long long unsigned*)&value);
UINT64_C(0xFFFFFFFFFF) & *(long long unsigned*)&value);
LOG_SCOPE;
Type* t = type->toBasetype();
return DtoConstFP(t, value);