bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: checking against signed integer overflow


From: Bruno Haible
Subject: Re: checking against signed integer overflow
Date: Sun, 06 Dec 2020 13:05:37 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-193-generic; KDE/5.18.0; x86_64; ; )

Hi Paul,

> I installed the attached patch to do that

Very nice! I made a tweak to the first example, to use printf() instead of
print(). Hope you agree.

> Your reaction to the *_WRAPV names just goes to show how bad I am with 
> marketing....

This set of macros would be worth publicizing, e.g. through an announcement
on planet.gnu.org. If you agree, we would
  1) publish the current gnulib doc on www.gnu.org (as we do occasionally
     anyway) [I can do that],
  2) write a news entry in https://savannah.gnu.org/projects/gnulib
  3) approve it, also through https://savannah.gnu.org/projects/gnulib


2020-12-06  Bruno Haible  <bruno@clisp.org>

        doc: Tweak example.
        * doc/intprops.texi (Checking Integer Overflow): Use 'printf', not
        'print'.

diff --git a/doc/intprops.texi b/doc/intprops.texi
index f3a958a..b668285 100644
--- a/doc/intprops.texi
+++ b/doc/intprops.texi
@@ -167,7 +167,7 @@ arithmetic.  For example:
 if ((a + b < b) == (a < 0))
   a += b;
 else
-  print ("overflow");
+  printf ("overflow\n");
 @end example
 
 @noindent




reply via email to

[Prev in Thread] Current Thread [Next in Thread]