[PPL-devel] [GIT] ppl/ppl(bounded_arithmetic): Also check for NaN in Bounded_Integer_Coefficient_Policy::handle_result().

Roberto Bagnara bagnara at cs.unipr.it
Wed May 13 20:29:31 CEST 2009


Module: ppl/ppl
Branch: bounded_arithmetic
Commit: 6ea0b6f8a8ee11ac70bd64d97558338f73e3cb22
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=6ea0b6f8a8ee11ac70bd64d97558338f73e3cb22

Author: Roberto Bagnara <bagnara at cs.unipr.it>
Date:   Wed May 13 20:20:28 2009 +0200

Also check for NaN in Bounded_Integer_Coefficient_Policy::handle_result().

---

 src/Coefficient.inlines.hh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/Coefficient.inlines.hh b/src/Coefficient.inlines.hh
index 4a7f68b..74fe0e2 100644
--- a/src/Coefficient.inlines.hh
+++ b/src/Coefficient.inlines.hh
@@ -28,7 +28,7 @@ namespace Parma_Polyhedra_Library {
 #ifdef PPL_CHECKED_INTEGERS
 inline void
 Bounded_Integer_Coefficient_Policy::handle_result(Result r) {
-  if (result_overflow(r))
+  if (result_overflow(r) || result_class(r) == VC_NAN)
     throw_result_exception(r);
 }
 #endif // PPL_CHECKED_INTEGERS




More information about the PPL-devel mailing list