diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2014-08-20 12:51:22 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2014-08-20 12:51:22 +0000 |
commit | a350ca30d76323cd8c9957b3d70e2ee3f7562d1f (patch) | |
tree | c552de500ca5785643d386ef61a13555f1819159 | |
parent | 6875a7c5fe477d7cc9686ad38b8856edb2d911ad (diff) | |
download | compcert-a350ca30d76323cd8c9957b3d70e2ee3f7562d1f.tar.gz compcert-a350ca30d76323cd8c9957b3d70e2ee3f7562d1f.zip |
Improve error reporting for unsupported compound literals.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2608 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
-rw-r--r-- | cparser/Elab.ml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cparser/Elab.ml b/cparser/Elab.ml index 15b749d6..a352e5f6 100644 --- a/cparser/Elab.ml +++ b/cparser/Elab.ml @@ -933,7 +933,10 @@ let elab_expr loc env a = { edesc = ECast(ty, b1); etyp = ty } | CAST ((spec, dcl), _) -> - error "cast of initializer expression is not supported" + err "compound literals are not supported"; + (* continue with dummy expression of the correct type *) + let ty = elab_type loc env spec dcl in + { edesc = ECast(ty, nullconst); etyp = ty } | EXPR_SIZEOF a1 -> let b1 = elab a1 in |