gbranden pushed a commit to branch master
in repository groff.

commit 9da08996d15768b00d47913f97130522c474573a
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Nov 30 04:48:46 2025 -0600

    [troff]: Adjust type of TAB_REPEAT_CHAR constant.
    
    * src/roff/troff/env.cpp: Explicitly construct the global constant
      `TAB_REPEAT_CHAR` as type `unsigned char`, because it is destined for
      comparison to input characters, instead of inheriting the type `char`
      from its literal initializer.
---
 ChangeLog              | 7 +++++++
 src/roff/troff/env.cpp | 5 +++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e18aa580e..0b3831bce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2025-11-30  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/env.cpp: Explicitly construct the global
+       constant `TAB_REPEAT_CHAR` as type `unsigned char`, because it
+       is destined for comparison to input characters, instead of
+       inheriting the type `char` from its literal initializer.
+
 2025-11-30  G. Branden Robinson <[email protected]>
 
        [troff]: Fix regression in syntax warning diagnostics introduced
diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp
index e1fdcc93a..73cd6a033 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -2806,8 +2806,9 @@ void input_trap_continued()
 
 /* tabs */
 
-// must not be R or C or L or a legitimate part of a number expression
-const unsigned char TAB_REPEAT_CHAR = 'T';
+// must not be R or C or L or a legitimate part of a numeric expression
+// TODO: grochar
+const unsigned char TAB_REPEAT_CHAR = (unsigned char)('T');
 
 struct tab {
   tab *next;

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to