diff options
Diffstat (limited to 'cparser')
-rw-r--r-- | cparser/Elab.ml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cparser/Elab.ml b/cparser/Elab.ml index f203c777..d5e30d9f 100644 --- a/cparser/Elab.ml +++ b/cparser/Elab.ml @@ -996,7 +996,7 @@ and elab_enum only loc tag optmembers attrs env = let tag = match tag with None -> "" | Some s -> s in match optmembers with | None -> - if only then + if only && not (redef Env.lookup_enum env tag) then fatal_error loc "forward declaration of 'enum %s' is not allowed in ISO C" tag; let (tag', info) = wrap Env.lookup_enum loc env tag in (tag', env) |