Skip to content

Commit

Permalink
Fix build.
Browse files Browse the repository at this point in the history
  • Loading branch information
jhjourdan committed Jun 18, 2019
1 parent 064fd90 commit ab6338d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
26 changes: 24 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,30 @@ else
ocaml_opt_comp=false
fi

# TODO
menhir_includes="-I `menhir --suggest-menhirLib`"
MENHIR_REQUIRED=20190613
echo "Testing Menhir... " | tr -d '\n'
menhir_ver=`menhir --version 2>/dev/null | sed -n -e 's/^.*version \([0-9]*\).*$/\1/p'`
case "$menhir_ver" in
20[0-9][0-9][0-9][0-9][0-9][0-9])
if test "$menhir_ver" -ge $MENHIR_REQUIRED; then
echo "version $menhir_ver -- good!"
menhir_include_dir=`menhir --suggest-menhirLib`
if test -z "$menhir_include_dir"; then
echo "Error: cannot determine the location of the Menhir API library."
echo "This can be due to an incorrect Menhir package."
echo "Consider using the OPAM package for Menhir."
missingtools=true
fi
else
echo "version $menhir_ver -- UNSUPPORTED"
echo "Error: CompCert requires a version greater or equal to $MENHIR_REQUIRED."
missingtools=true
fi;;
*)
echo "NOT FOUND"
echo "Error: make sure Menhir version $MENHIR_REQUIRED or later is installed."
missingtools=true;;
esac

echo "Testing GNU make... " | tr -d '\n'
make=''
Expand Down
2 changes: 1 addition & 1 deletion cparser/Elab.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2708,7 +2708,7 @@ let elab_fundef genv spec name defs body loc =
(* Definitions *)
let elab_decdef (for_loop: bool) (local: bool) (nonstatic_inline: bool)
(env: Env.t) ((spec, namelist): Cabs.init_name_group)
(loc: Cabs.cabsloc) : decl list * Env.t =
(loc: Cabs.loc) : decl list * Env.t =
let (sto, inl, noret, tydef, bty, env') =
elab_specifier ~only:(namelist=[]) loc env spec in
(* Sanity checks on storage class *)
Expand Down

0 comments on commit ab6338d

Please sign in to comment.