Skip to content

Commit

Permalink
Merge pull request eth-sri#52 from jmct/master
Browse files Browse the repository at this point in the history
Add ./configure option to suppress overflow warnings
  • Loading branch information
Gagandeep Singh authored Oct 1, 2019
2 parents 32ddee7 + c644ef1 commit 2952736
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
6 changes: 5 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ where options include:
-use-ocamlfind enable OCamlfind support
-use-java enable Java support (only available with APRON)
-use-opam use opam to install ELINA
-no-warn-overflow Silence all output relating to sound overflow
Environment variables that affect configuration:
CC C compiler to use (default: gcc)
Expand Down Expand Up @@ -55,6 +56,7 @@ has_java=0
use_opam=0
has_apron=0
has_vector=0
extra_elina_options=""
force_absolute_dylib_install_names=0;
while : ; do
case "$1" in
Expand All @@ -78,6 +80,8 @@ while : ; do
-java-prefix|--java-prefix)
java_prefix="$2"
shift;;
-no-warn-overflow|--no-warn-overflow)
extra_elina_options+="-DNO_WARN_OVERFLOW";;
-use-ocaml|--use-ocaml)
has_ocaml=1;;
-use-ocamlfind|--use-ocamlfind)
Expand Down Expand Up @@ -287,7 +291,7 @@ done
if test "$cc" = "none"; then echo "no C compiler found"; exit 1; fi

acc=""
for i in $c_cxx_flags -Werror-implicit-function-declaration -Wbad-function-cast -Wstrict-prototypes -Wno-strict-overflow -std=c99 $CFLAGS $LDFLAGS
for i in $c_cxx_flags -Werror-implicit-function-declaration -Wbad-function-cast -Wstrict-prototypes -Wno-strict-overflow -std=c99 $CFLAGS $LDFLAGS $extra_elina_options
do
checkcomp "$cc" "$i"
done
Expand Down
10 changes: 6 additions & 4 deletions elina_poly/opt_pk_vector.c
Original file line number Diff line number Diff line change
Expand Up @@ -566,10 +566,12 @@ void opt_vector_combine(opt_pk_internal_t* opk,

ov3[k] = 0;
if(flag){
fprintf(stderr, "exception \n");
fflush(stderr);
opk->exn = ELINA_EXC_OVERFLOW;
return;
#ifndef NO_WARN_OVERFLOW
fprintf(stderr,"overflow exception \n");
fflush(stderr);
#endif /* NO_WARN_OVERFLOW */
opk->exn = ELINA_EXC_OVERFLOW;
return ;
}
/*for (j=0; j<size; j++){
if (opt_numint_abs(ov3[j]) > (ELINA_INT_MAX/2)){
Expand Down

0 comments on commit 2952736

Please sign in to comment.