From c72445321a6ae3577a1522c0ad12859565fb19bc Mon Sep 17 00:00:00 2001 From: xleroy Date: Sun, 31 Jul 2011 13:09:39 +0000 Subject: Flag long long and long double literals git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1695 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- cfrontend/C2C.ml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cfrontend/C2C.ml b/cfrontend/C2C.ml index f8905a60..bdddd14a 100644 --- a/cfrontend/C2C.ml +++ b/cfrontend/C2C.ml @@ -419,9 +419,13 @@ let rec convertExpr env e = else Evalof(l, ty) - | C.EConst(C.CInt(i, _, _)) -> + | C.EConst(C.CInt(i, k, _)) -> + if k = C.ILongLong || k = C.IULongLong then + unsupported "'long long' integer literal"; Eval(Vint(convertInt i), ty) - | C.EConst(C.CFloat(f, _, _)) -> + | C.EConst(C.CFloat(f, k, _)) -> + if k = C.FLongDouble then + unsupported "'long double' floating-point literal"; Eval(Vfloat(f), ty) | C.EConst(C.CStr s) -> let ty = typeStringLiteral s in -- cgit