From 8ef12142b7a5371eb5cf00502693dffa61bd7bad Mon Sep 17 00:00:00 2001
From: Basile Desloges <basile.desloges@cea.fr>
Date: Mon, 8 Feb 2021 18:38:27 +0100
Subject: [PATCH] [eacsl] wrapper script: deactivate Variadic translation if
 format strings are validated

The Variadic plugin translation is incompatible with the use of option
 `-e-acsl-validate-format-strings`, so add the option
 `-variadic-no-translation` if the user activated the validation of
 format strings.
---
 src/plugins/e-acsl/scripts/e-acsl-gcc.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/plugins/e-acsl/scripts/e-acsl-gcc.sh b/src/plugins/e-acsl/scripts/e-acsl-gcc.sh
index 6ab2349458c..bd52cb6198b 100755
--- a/src/plugins/e-acsl/scripts/e-acsl-gcc.sh
+++ b/src/plugins/e-acsl/scripts/e-acsl-gcc.sh
@@ -897,6 +897,11 @@ fi
 FRAMAC_FLAGS="$FRAMAC_FLAGS \
   -remove-unused-specified-functions"
 
+if [ -n "$OPTION_VALIDATE_FORMAT_STRINGS" ]; then
+  FRAMAC_FLAGS="$FRAMAC_FLAGS \
+    -variadic-no-translation"
+fi
+
 # C, CPP and LD flags for compilation of E-ACSL-generated sources
 EACSL_CFLAGS="$OPTION_EXTERNAL_ASSERT"
 EACSL_CPPFLAGS="-I$EACSL_SHARE"
-- 
GitLab