From 5e473b596f4b0df9fdb05a0976c5913449b934d4 Mon Sep 17 00:00:00 2001
From: Virgile Prevosto <virgile.prevosto@m4x.org>
Date: Fri, 15 Jan 2021 10:02:22 +0100
Subject: [PATCH] [eva] fix checking that empty struct are accepted in current
 config

---
 src/plugins/value/domains/cvalue/cvalue_init.ml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/plugins/value/domains/cvalue/cvalue_init.ml b/src/plugins/value/domains/cvalue/cvalue_init.ml
index 063a3ce6fe1..d5d2316e828 100644
--- a/src/plugins/value/domains/cvalue/cvalue_init.ml
+++ b/src/plugins/value/domains/cvalue/cvalue_init.ml
@@ -98,7 +98,7 @@ let create_hidden_base ~libc ~valid ~hidden_var_name ~name_desc pointed_typ =
 let reject_empty_struct b offset typ =
   match Cil.unrollType typ with
   | TComp (ci, _, _) ->
-    if ci.cfields = Some [] && not (Cil.gccMode () || Cil.msvcMode ()) then
+    if ci.cfields = Some [] && not (Cil.acceptEmptyCompinfo ()) then
       Value_parameters.abort ~current:true
         "@[empty %ss@ are unsupported@ (type '%a',@ location %a%a)@ \
          in C99 (only allowed as GCC/MSVC extension).@ Aborting.@]"
-- 
GitLab