From debbae89f9faf47b95bd1c86058cd232783f3c3f Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Thu, 4 Jul 2019 12:59:33 +0200 Subject: Added new diagnostic for non-linear conditionals The new diagnostics is triggered if a conditional is used that may not be transformed into linear code by the later by the if conversion. The new diagnostic is emitted if a conditional may contain an unsafe expression or is contained within another conditional, logical and or logical or expression. An expression is unsafe if it contains a call, changes memory or if its evaluation leads to undefined behavior, for example division and modulo. Also fixes a small typo in a comment in Cutil. --- cparser/Checks.mli | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cparser/Checks.mli') diff --git a/cparser/Checks.mli b/cparser/Checks.mli index 4d61a5b8..cfd7b04d 100644 --- a/cparser/Checks.mli +++ b/cparser/Checks.mli @@ -16,3 +16,5 @@ val unknown_attrs_program: C.program -> unit val unused_variables: C.program -> unit + +val non_linear_conditional : C.program -> unit -- cgit