gbranden pushed a commit to branch master
in repository groff.
commit 2a3c5350e85875df2bed67f884ab03eab4dfc2ea
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Apr 28 00:45:00 2025 -0500
[grolj4, pic]: Improve C++98 conformance.
* src/devices/grolj4/lj4.cpp (struct lj4_command_table):
* src/preproc/pic/pic.ypp (struct pic_defaults_table): Give anonymous
structure types names; anonymous structs cannot be passed to templates
prior to C++11.
---
ChangeLog | 9 +++++++++
src/devices/grolj4/lj4.cpp | 2 +-
src/preproc/pic/pic.ypp | 2 +-
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 25c603033..10be12e3b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2025-04-26 G. Branden Robinson <[email protected]>
+
+ [grolj4, pic]: Improve C++98 conformance.
+
+ * src/devices/grolj4/lj4.cpp (struct lj4_command_table):
+ * src/preproc/pic/pic.ypp (struct pic_defaults_table): Give
+ anonymous structure types names; anonymous structs cannot be
+ passed to templates prior to C++11.
+
2025-04-26 G. Branden Robinson <[email protected]>
* src/libs/libgroff/string.cpp (string::json_length):
diff --git a/src/devices/grolj4/lj4.cpp b/src/devices/grolj4/lj4.cpp
index 09da09dc6..70b178379 100644
--- a/src/devices/grolj4/lj4.cpp
+++ b/src/devices/grolj4/lj4.cpp
@@ -127,7 +127,7 @@ lj4_font *lj4_font::load_lj4_font(const char *s)
return f;
}
-static struct {
+static struct lj4_command_table {
const char *s;
int lj4_font::*ptr;
int min;
diff --git a/src/preproc/pic/pic.ypp b/src/preproc/pic/pic.ypp
index 8740b8c12..61f0d7266 100644
--- a/src/preproc/pic/pic.ypp
+++ b/src/preproc/pic/pic.ypp
@@ -1731,7 +1731,7 @@ isn't under cfront */
#undef const
#endif
-static struct {
+static struct pic_defaults_table {
const char *name;
double val;
int scaled; // non-zero if val should be multiplied by scale
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit