summaryrefslogtreecommitdiff
path: root/cfrontend
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2014-01-02 15:31:09 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2014-01-02 15:31:09 +0000
commitc71e155dbbf34fa17d14e8eee50a019c8ccfd6f5 (patch)
tree8faab99eacae81a032b248cfef0bb51bd2a36e65 /cfrontend
parent7135f93c41413ed750ad8d2660541c95b37003b5 (diff)
Incomplete types are OK for 'extern' global variables.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2398 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'cfrontend')
-rw-r--r--cfrontend/C2C.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/cfrontend/C2C.ml b/cfrontend/C2C.ml
index ff4b6c1..3f3df2e 100644
--- a/cfrontend/C2C.ml
+++ b/cfrontend/C2C.ml
@@ -918,7 +918,7 @@ let convertGlobvar loc env (sto, id, ty, optinit) =
if Z.gt sz (Z.of_uint64 0xFFFF_FFFFL) then
error (sprintf "'%s' is too big (%s bytes)"
id.name (Z.to_string sz));
- if Cutil.incomplete_type env ty then
+ if sto <> C.Storage_extern && Cutil.incomplete_type env ty then
error (sprintf "'%s' has incomplete type" id.name);
Hashtbl.add decl_atom id'
{ a_storage = sto;