summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2008-12-12 11:57:37 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2008-12-12 11:57:37 +0000
commite6c5a32a307cd2be7ede8dbe17c5171fc71e1be4 (patch)
treea9a6507e4c2b44b6ef0ec94d09d75c6c3fb3f4f8
parent772ca62f70ef92b3b3fb100b2ff92a32e22e5aaa (diff)
downloadmpfr-e6c5a32a307cd2be7ede8dbe17c5171fc71e1be4.tar.gz
vasprintf.c: revert incorrect change in r5713.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5717 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r--vasprintf.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/vasprintf.c b/vasprintf.c
index bc2fcc9a7..b5fb26312 100644
--- a/vasprintf.c
+++ b/vasprintf.c
@@ -100,13 +100,8 @@ static const char num_to_text[] = "0123456789abcdef";
case '9': \
MPFR_ASSERTN (specinfo.field < INT_MAX / 10); \
specinfo.field *= 10; \
- /* The test specinfo.field <= INT_MAX - *(format) + '0' \
- produces a trap with gcc 4.1.2 -ftrapv on a 32-bit machine, \
- most probably gcc precomputes INT_MAX + '0' and then subtracts \
- *(format), which clearly underflows. We thus prefer to do the \
- check afterwards. */ \
+ MPFR_ASSERTN (specinfo.field < INT_MAX - *(format) + '0'); \
specinfo.field += *(format) - '0'; \
- MPFR_ASSERTN (specinfo.field >= *(format) - '0'); \
++(format); \
break; \
case '*': \