[GIT] ppl/ppl(master): Refuse to compile on (very obsolete) architectures that are not using two's complement.

Module: ppl/ppl Branch: master Commit: b07586183751999b86e2db0bb31a43baa2ac8e4e URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=b075861837519...
Author: Abramo Bagnara abramo.bagnara@gmail.com Date: Sat Apr 17 12:00:38 2010 +0200
Refuse to compile on (very obsolete) architectures that are not using two's complement.
---
src/checked_int.inlines.hh | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/checked_int.inlines.hh b/src/checked_int.inlines.hh index f55416c..79985cd 100644 --- a/src/checked_int.inlines.hh +++ b/src/checked_int.inlines.hh @@ -688,6 +688,10 @@ PPL_SPECIALIZE_ASSIGN(assign_int_mpq, unsigned int, mpq_class) PPL_SPECIALIZE_ASSIGN(assign_int_mpq, unsigned long, mpq_class) PPL_SPECIALIZE_ASSIGN(assign_int_mpq, unsigned long long, mpq_class)
+#if ~0 != -1 +#error "Only two's complement is supported" +#endif + #if UCHAR_MAX == 0xff #define CHAR_BITS 8 #else
participants (1)
-
Abramo Bagnara