[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [csmith-dev] compcert support



I forgot the specific reason. Seems when I did my tests, CompCert had some limitation on 64-bit integers. On 64-bit machine, a long integer has the size of 8 bytes. So I just removed the "L" suffix.

- Yang

On 8/10/2011 8:58 PM, John Regehr wrote:
Can someone explain the code below? Why would we want to omit the L only
when someone wants to target CompCert? It's from Constant.cpp.

John




static string
GenerateRandomCharConstant(void)
{
string ch;
if (CGOptions::ccomp())
ch = string("0x") + RandomHexDigits(2);
else
ch = string("0x") + RandomHexDigits(2) + "L";
return ch;
}