summaryrefslogtreecommitdiff
path: root/cfrontend
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2011-07-31 13:09:39 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2011-07-31 13:09:39 +0000
commitc72445321a6ae3577a1522c0ad12859565fb19bc (patch)
tree2732589bf7dcf4a5eb9f668d528e0adb0c4747f4 /cfrontend
parent2079efb2b129e3d00a51b2ed9febef2619742201 (diff)
Flag long long and long double literals
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1695 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'cfrontend')
-rw-r--r--cfrontend/C2C.ml8
1 files changed, 6 insertions, 2 deletions
diff --git a/cfrontend/C2C.ml b/cfrontend/C2C.ml
index f8905a6..bdddd14 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