From 57dc6a21dbae80c6620dd8e481e04654f057e7b2 Mon Sep 17 00:00:00 2001
From: Virgile Prevosto <virgile.prevosto@m4x.org>
Date: Thu, 11 Jul 2019 15:32:09 +0200
Subject: [PATCH] [printer] don't distinguish various questionLevel

A ternary operator is a ternary operator. It doesn't matter whether it is
in term or predicate position
---
 src/kernel_services/ast_printing/cil_printer.ml | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/kernel_services/ast_printing/cil_printer.ml b/src/kernel_services/ast_printing/cil_printer.ml
index b6cf5cc51d4..56e90a0407b 100644
--- a/src/kernel_services/ast_printing/cil_printer.ml
+++ b/src/kernel_services/ast_printing/cil_printer.ml
@@ -181,8 +181,6 @@ module Precedence = struct
   let assoc_connector_level x =
     and_level <= x && x <= or_level
 
-  let logic_level = 77 (* Tif:     4 [%right QUESTION prec_question]  ??? *)
-
   let bitwiseLevel = 75        (* 10 [%left BIFF]
                                   11 [%right BIMPLIES]
                                   12 [%left PIPE]
@@ -334,7 +332,7 @@ module Precedence = struct
     (* Constructions that do not require parentheses *)
     | TConst _
     | Tnull | TLval (TResult _,TNoOffset) | Tcomprehension _  | Tempty_set -> 0
-    | Tif (_, _, _)  -> logic_level
+    | Tif (_, _, _)  -> questionLevel
     | TLogic_coerce(_,e) -> (getParenthLevelLogic e.term_node) + 1
 
   (* Create an expression of the same shape, and use {!getParenthLevel} *)
-- 
GitLab