gbranden pushed a commit to branch master
in repository groff.
commit 4ba2923fceb05e51f8eb747eaf511b52acd5d59e
Author: G. Branden Robinson <[email protected]>
AuthorDate: Tue Aug 20 08:30:48 2024 -0500
HACKING: Add note about C++ value initializers.
---
HACKING | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/HACKING b/HACKING
index 8f2945906..c316ba792 100644
--- a/HACKING
+++ b/HACKING
@@ -28,6 +28,14 @@ Portability notes:
template function in src/include/lib.h instead of `sizeof` and
dividing.
+* C++98 lacks value initialization for array types.
+
+ https://cplusplus.github.io/CWG/issues/178.html
+
+ Use `memset()` after allocating an array from the stack or the heap
+ unless you are sure that every path through subsequent logic
+ determines the contents of every array element.
+
Automake
--------
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit