diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2012-02-26 10:41:07 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2012-02-26 10:41:07 +0000 |
commit | 2570ddd61b1c98b62c8d97fce862654535696844 (patch) | |
tree | e9a652b115045a3b2c4ade69ec3cc3fdad429b54 /cparser/Ceval.ml | |
parent | 65cc3738e7436e46f70c0508638a71fbb49c50a8 (diff) | |
download | compcert-2570ddd61b1c98b62c8d97fce862654535696844.tar.gz compcert-2570ddd61b1c98b62c8d97fce862654535696844.zip |
- Support for _Alignof(ty) operator from ISO C 2011
and __alignof__(ty), __alignof__(expr) from GCC.
- Resurrected __builtin_memcpy_aligned, useful for files generated
by Scade KCG 6.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1827 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'cparser/Ceval.ml')
-rw-r--r-- | cparser/Ceval.ml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cparser/Ceval.ml b/cparser/Ceval.ml index fbeb5224..4fc01e5b 100644 --- a/cparser/Ceval.ml +++ b/cparser/Ceval.ml @@ -246,6 +246,11 @@ let rec expr env e = | None -> raise Notconst | Some n -> I(Int64.of_int n) end + | EAlignof ty -> + begin match alignof env ty with + | None -> raise Notconst + | Some n -> I(Int64.of_int n) + end | EVar _ -> raise Notconst | EUnop(op, e1) -> |