diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2019-07-04 12:59:33 +0200 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2019-07-04 12:59:33 +0200 |
commit | debbae89f9faf47b95bd1c86058cd232783f3c3f (patch) | |
tree | c98aa4f51c5e80f5f01e74ffe07958d4632667f6 /cparser/Elab.ml | |
parent | ed2318e287c6edeeceed7e2a104195b08aa3e31a (diff) | |
download | compcert-kvx-debbae89f9faf47b95bd1c86058cd232783f3c3f.tar.gz compcert-kvx-debbae89f9faf47b95bd1c86058cd232783f3c3f.zip |
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.
Diffstat (limited to 'cparser/Elab.ml')
-rw-r--r-- | cparser/Elab.ml | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cparser/Elab.ml b/cparser/Elab.ml index 10380152..4d27598f 100644 --- a/cparser/Elab.ml +++ b/cparser/Elab.ml @@ -3095,4 +3095,5 @@ let elab_file prog = let p = elaborated_program () in Checks.unused_variables p; Checks.unknown_attrs_program p; + Checks.non_linear_conditional p; p |