gbranden pushed a commit to branch master
in repository groff.
commit 8fb704e1ab365dd4d21162866aae3399fa109fcc
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Nov 14 12:19:43 2025 -0600
[troff]: Withdraw "number" warning category.
The previous change left it without any instances.
* src/roff/troff/troff.h (enum warning_type): Drop `WARN_NUMBER`
enumeration constant.
* src/roff/troff/input.cpp: Drop "number" element from `warning_table`
static array. Update default warning mask to exclude it.
* doc/groff.texi.in (Warnings):
* src/roff/troff/troff.1.man (Warnings): De-document it.
* NEWS: Report change.
Fixes <https://savannah.gnu.org/bugs/?67698> (1/2).
---
ChangeLog | 18 ++++++++++++++++++
NEWS | 3 +++
doc/groff.texi.in | 10 +++++-----
src/roff/troff/input.cpp | 3 +--
src/roff/troff/troff.1.man | 14 +++++++-------
src/roff/troff/troff.h | 2 +-
6 files changed, 35 insertions(+), 15 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 074135e68..ef3632eaf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2025-11-14 G. Branden Robinson <[email protected]>
+
+ [troff]: Withdraw "number" warning category. The previous
+ change left it without any instances.
+
+ * src/roff/troff/troff.h (enum warning_type): Drop `WARN_NUMBER`
+ enumeration constant.
+ * src/roff/troff/input.cpp: Drop "number" element from
+ `warning_table` static array. Update default warning mask to
+ exclude it.
+
+ * doc/groff.texi.in (Warnings):
+ * src/roff/troff/troff.1.man (Warnings): De-document it.
+
+ * NEWS: Report change.
+
+ Fixes <https://savannah.gnu.org/bugs/?67698> (1/2).
+
2025-11-14 G. Branden Robinson <[email protected]>
* src/roff/troff/number.cpp: Refactor numeric expression parser
diff --git a/NEWS b/NEWS
index cfb2c8694..2d44b73e1 100644
--- a/NEWS
+++ b/NEWS
@@ -139,6 +139,9 @@ troff
`trf` requests, and the second argument to the `open` and `opena`
requests. See "soelim" below.
+* The "number" warning category has been withdrawn. The diagnostic
+ that formerly used it has been promoted to an error.
+
* The "el" warning category has been withdrawn. If enabled (which it
was not by default), the formatter would emit a diagnostic if it
inferred an imbalance between `ie` and `el` requests. Unfortunately
diff --git a/doc/groff.texi.in b/doc/groff.texi.in
index 917d63c6e..3ecf44724 100644
--- a/doc/groff.texi.in
+++ b/doc/groff.texi.in
@@ -19290,11 +19290,11 @@ and no mounted font defines a glyph for it,
or input could not be encoded for device-independent output.
This category is enabled by default.
-@item number
-@itemx 2
-An invalid numeric expression was encountered. This category is enabled
-by default.
-@xref{Numeric Expressions}.
+@c @item number
+@c @itemx 2
+@c An invalid numeric expression was encountered. This category is
+@c enabled by default.
+@c @xref{Numeric Expressions}.
@item break
@itemx 4
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 6a8af79c0..f522154d0 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -73,7 +73,7 @@ along with this program. If not, see
<http://www.gnu.org/licenses/>. */
#ifndef DEFAULT_WARNING_MASK
// warnings that are enabled by default
#define DEFAULT_WARNING_MASK \
- (WARN_CHAR|WARN_NUMBER|WARN_BREAK|WARN_SPACE|WARN_FONT|WARN_FILE)
+ (WARN_CHAR|WARN_BREAK|WARN_SPACE|WARN_FONT|WARN_FILE)
#endif
extern "C" const char *program_name;
@@ -10253,7 +10253,6 @@ static struct warning_category {
{ "break", WARN_BREAK },
{ "delim", WARN_DELIM },
{ "scale", WARN_SCALE },
- { "number", WARN_NUMBER },
{ "syntax", WARN_SYNTAX },
{ "tab", WARN_TAB },
{ "right-brace", WARN_RIGHT_BRACE },
diff --git a/src/roff/troff/troff.1.man b/src/roff/troff/troff.1.man
index 065c8709a..612040857 100644
--- a/src/roff/troff/troff.1.man
+++ b/src/roff/troff/troff.1.man
@@ -572,7 +572,7 @@ R Ri Lb | R Ri Lb.
Bit@Code@Category@Bit@Code@Category
_
0@1@char@10@1024@reg
-1@2@number@11@2048@tab
+1@2@\fIunused\fP@11@2048@tab
2@4@break@12@4096@right\-brace
3@8@delim@13@8192@missing
4@16@\fIunused\fP@14@16384@input
@@ -753,12 +753,12 @@ A request was invoked with a mandatory argument absent.
T}
.
.
-.sp \n[PD]u
-number 2 T{
-An invalid numeric expression was encountered.
-.
-This category is enabled by default.
-T}
+.\" .sp \n[PD]u
+.\" number 2 T{
+.\" An invalid numeric expression was encountered.
+.\" .
+.\" This category is enabled by default.
+.\" T}
.
.
.sp \n[PD]u
diff --git a/src/roff/troff/troff.h b/src/roff/troff/troff.h
index 9c680c12e..93873834e 100644
--- a/src/roff/troff/troff.h
+++ b/src/roff/troff/troff.h
@@ -48,7 +48,7 @@ extern search_path *mac_path;
enum warning_type {
WARN_CHAR = 01,
- WARN_NUMBER = 02,
+ //WARN_NUMBER = 02, // withdrawn in groff 1.24
WARN_BREAK = 04,
WARN_DELIM = 010,
//WARN_EL = 020, // withdrawn in groff 1.24
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit