gbranden pushed a commit to branch master
in repository groff.
commit 5a7a581111ec8dfc22c6acd0e48f972b90a498b8
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Jun 24 18:12:43 2026 -0500
[pic]: Improve diagnostic message.
* src/preproc/pic/lex.cpp (interpolate_macro_with_args): When warning of
ignored excess macro arguments, explicit state that they're ignored.
---
ChangeLog | 6 ++++++
src/preproc/pic/lex.cpp | 5 +++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0013ce9b4..166742789 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2026-06-24 G. Branden Robinson <[email protected]>
+
+ * src/preproc/pic/lex.cpp (interpolate_macro_with_args): When
+ warning of ignored excess macro arguments, explicit state that
+ they're ignored.
+
2026-06-24 G. Branden Robinson <[email protected]>
* src/preproc/pic/lex.cpp (interpolate_macro_with_args):
diff --git a/src/preproc/pic/lex.cpp b/src/preproc/pic/lex.cpp
index ed374e928..7ea317786 100644
--- a/src/preproc/pic/lex.cpp
+++ b/src/preproc/pic/lex.cpp
@@ -418,8 +418,9 @@ static void interpolate_macro_with_args(const char *body)
if (state == NORMAL && level == 0 && (c == ',' || c == ')')) {
if (!is_ignoring_arguments) {
if (argc == pic_macro_maximum_arg_count) {
- lex_warning("pic supports at most %1 macro arguments",
- pic_macro_maximum_arg_count);
+ lex_warning("pic supports at most %1 macro arguments;"
+ " ignoring excess",
+ pic_macro_maximum_arg_count);
is_ignoring_arguments = true;
}
else if (token_buffer.length() > 0) {
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit