bug-groff
[Top][All Lists]
Advanced

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

[bug #66001] [troff] implement saturating arithmetic


From: G. Branden Robinson
Subject: [bug #66001] [troff] implement saturating arithmetic
Date: Mon, 19 Aug 2024 20:10:41 -0400 (EDT)

Update of bug #66001 (group groff):

                  Status:             In Progress => Fixed                  
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #2:

Where'd the "Planned Release" field go?? :(


commit 17f18cc8cbedb6fcb83b531f253a288a19ec36e0
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Aug 16 14:53:13 2024 -0500

    [troff]: Fix Savannah #66001 (saturating arith).
    
    * src/roff/troff/number.cpp (is_valid_term): When reading an overlong
      integer literal, save the value corresponding to the longest valid
      digit sequence, and use that if overflow occurs.
    
      (scale): Demote "numeric overflow" errors to "integer value saturated"
      warnings in category "range".
    
    * src/roff/troff/hvunits.h (vunits::to_units)
      (class vunits: operator +, operator -, operator *):
      (hunits::to_units)
      (class hunits: operator +, operator -, operator *):
    * src/roff/troff/number.cpp (vunits::vunits, hunits::hunits): Impose
      saturating arithmetic on overflowing operations.  Demote overflow from
      error, throwing warning in "range" category if overflow would occur,
      and describe integer result as "saturated" rather than "wrapped".
    
    * src/roff/groff/tests/arithmetic-works.sh: Enable warnings in "range"
      category.  Update test expectations.  Drop check of operation that is
      no longer meaningful with refactored arithmetic parsing.
    
    * doc/groff.texi.in (Numeric Expressions):
    * man/groff.7.man (Numeric expressions):
    * NEWS: Document it.
    
    Fixes <https://savannah.gnu.org/bugs/?66001>.




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?66001>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature


reply via email to

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