diff options
author | Xavier Leroy <xavierleroy@users.noreply.github.com> | 2018-06-07 15:26:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-07 15:26:02 +0200 |
commit | 285933f8ca633495e7e4d03481a58ead3323c504 (patch) | |
tree | 81983eabd13d100a498fc937eb30eb3adce13ba8 /cparser/Elab.ml | |
parent | 18b05651231b4b79e3169e168d53b2c5da27983b (diff) | |
download | compcert-kvx-285933f8ca633495e7e4d03481a58ead3323c504.tar.gz compcert-kvx-285933f8ca633495e7e4d03481a58ead3323c504.zip |
Remove the `_Alignas(expr)` construct (#125)
The `_Alignas(expr)` construct is not C11, only `_Alignas(type)` is.
Diffstat (limited to 'cparser/Elab.ml')
-rw-r--r-- | cparser/Elab.ml | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/cparser/Elab.ml b/cparser/Elab.ml index e9a17042..8a643362 100644 --- a/cparser/Elab.ml +++ b/cparser/Elab.ml @@ -1804,15 +1804,7 @@ let elab_expr ctx loc env a = error "invalid application of 'sizeof' to an incomplete type %a" (print_typ env) ty; { edesc = ESizeof ty; etyp = TInt(size_t_ikind(), []) },env' - | EXPR_ALIGNOF a1 -> - let b1,env = elab env a1 in - if wrap incomplete_type loc env b1.etyp then - error "invalid application of '_Alignof' to an incomplete type %a" (print_typ env) b1.etyp; - if wrap is_bitfield loc env b1 then - error "invalid application of '_Alignof' to a bit-field"; - { edesc = EAlignof b1.etyp; etyp = TInt(size_t_ikind(), []) },env - - | TYPE_ALIGNOF (spec, dcl) -> + | ALIGNOF (spec, dcl) -> let (ty, env') = elab_type loc env spec dcl in warning Celeven_extension "'_Alignof' is a C11 extension"; if wrap incomplete_type loc env' ty then |