@@ -97,7 +97,7 @@ $(H2 $(LEGACY_LNAME2 Basic Data Types, basic-data-types, Basic Data Types))
9797
9898 $(TABLE_3COLS Basic Data Types,
9999 $(THEAD Keyword, Default Initializer ($(D .init)), Description)
100- $(TROW $(D void), no default initializer, `void` has no value)
100+ $(TROW $(RELATIVE_LINK2 void, $( D void) ), no default initializer, `void` has no value)
101101 $(TROW $(RELATIVE_LINK2 bool, $(D bool)), $(D false), boolean value)
102102 $(TROW $(D byte), $(D 0), signed 8 bits)
103103 $(TROW $(D ubyte), $(D 0u), unsigned 8 bits)
@@ -577,6 +577,23 @@ $(H3 $(LNAME2 vrp, Value Range Propagation))
577577 * See also: $(LINK https://en.wikipedia.org/wiki/Value_range_analysis).
578578
579579
580+ $(H2 $(LNAME2 void, $(D void)))
581+
582+ $(P A `void` value cannot be accessed directly. The `void` type is notably used for:)
583+
584+ * The return type of a function that doesn't have a result.
585+ * The base type for an untyped pointer -
586+ see $(RELATIVE_LINK2 pointer-conversions, Pointer Conversions).
587+ * $(DDSUBLINK spec/arrays, void_arrays, Void arrays).
588+ * $(DDSUBLINK spec/expression, cast_void, Ignoring a value) by casting to `void`.
589+
590+ $(P `void.sizeof` is 1 (not 0).)
591+
592+ $(RATIONALE The size must be 1 to make `void*` arithmetic work like it does in C.
593+ It also makes the length of a void array equivalent to the number of
594+ bytes in the array.)
595+
596+
580597$(H2 $(LNAME2 bool, $(D bool)))
581598
582599$(P The bool type is a byte-size type that can only hold the value `true` or
0 commit comments