Follow-up Comment #5, bug #67735 (group groff):

Some progress toward this goal is seen in my push today.


commit 3699f5298485274162514d3e8ea1fb332113458d
Author: G. Branden Robinson <[email protected]>
Date:   Thu Nov 27 02:21:34 2025 -0600

    [troff]: Modestly refactor (1/8).
    
    Perform more careful comparisons of the `unsigned char` values the
    formatter reads from input (or a token sequence) by promoting either the
    token or a character literal to which it is compared to `int` to (A)
    explicitly avoid issues with the implementation-defined signedness of
    unqualified `char`, and (B) lay foundation for future migration of GNU
    troff's internal character type to a custom, wider type.
    
    * src/roff/troff/div.cpp (return_request): Construct integer from
      character literal.

commit 437c81577ea9cfba5ce81958d82370f21921fc27
Author: G. Branden Robinson <[email protected]>
Date:   Thu Nov 27 02:22:18 2025 -0600

    [troff]: Modestly refactor (2/8).
    
    * src/roff/troff/reg.cpp (assign_register_format_request):
      Construct integer from character literal.  Store return value of
      `tok.ch()` in local variable of `int`, not `char`, type.

commit 9700152b56e59c193078091baa0552867616d149
Author: G. Branden Robinson <[email protected]>
Date:   Thu Nov 27 02:25:38 2025 -0600

    [troff]: Modestly refactor (3/8).
    
    * src/roff/troff/env.cpp: Retype global `TAB_REPEAT_CHAR` from (`const`)
      `char` to `unsigned char`.
    
      (configure_tab_stops_request): Construct integer from character
    literal.
    
      (adjust): Store return value of `tok.ch()` in temporary local variable
      of `int`, not `char`, type.

commit f0bb39a6962f7b7882b1eb74d9973a3adf9b55f8
Author: G. Branden Robinson <[email protected]>
Date:   Fri Nov 28 19:24:21 2025 -0600

    [troff]: Modestly refactor (4/8).
    
    * src/roff/troff/number.cpp (get_incr_number)
      (is_valid_expression, is_valid_term):
      Construct integer from character literal.
    
      (is_valid_term): Store return value of `tok.ch()` in temporary local
      variable of `int`, not `char`, type.

commit e1aae13b1b1f247c99e2d065c3b18ae0f081a95c
Author: G. Branden Robinson <[email protected]>
Date:   Fri Nov 28 19:25:16 2025 -0600

    [troff]: Modestly refactor (5/8).
    
    * src/roff/troff/input.cpp (get_line_arg): Construct integer from
      character literal.

commit cfd134fe50644f4aff41cbd37ebe8fa51689484d
Author: G. Branden Robinson <[email protected]>
Date:   Thu Nov 27 00:41:53 2025 -0600

    [troff]: Modestly refactor (6/8).
    
    * src/roff/troff/input.cpp (read_size):
      Construct integer from character literal.
    
    * src/roff/troff/input.cpp (read_size): Use local variables to avoid
      repeated member function calls.  (Presumably a smart optimizer would
      do the equivalent on its own, but this change also makes a lengthy
      compound conditional expression shorter.)

commit a761a966ad16d5377540edfa22240e78975240f8
Author: G. Branden Robinson <[email protected]>
Date:   Thu Nov 27 01:05:08 2025 -0600

    [troff]: Modestly refactor (7/8).
    
    * src/roff/troff/input.cpp (is_conditional_expression_true):
      Construct integer from character literal.  Store return value of
      `tok.ch()` in temporary local variable of `int`, not `unsigned char`,
      type.

commit 7825b80f5fc0a4efd7e2b2fb45a5284f81c97ee4
Author: G. Branden Robinson <[email protected]>
Date:   Thu Nov 27 02:16:17 2025 -0600

    [troff]: Modestly refactor (8/8).
    
    * src/roff/troff/input.cpp (read_drawing_command): Store return value of
      `tok.ch()` in local variable of `int`, not `unsigned char`, type.




    _______________________________________________________

Reply to this item at:

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

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

Attachment: signature.asc
Description: PGP signature

Reply via email to