summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-05-20 07:10:51 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-05-20 07:10:51 -0700
commitbdbcc050c7c2c50d33da2bc14ba861f74ec111f0 (patch)
treeacfd6c60c99c1211439986f18c5b445b708c045d
parent92b915b8623fbc7cad56d46293d1416ab8f0a44a (diff)
downloadtxr-bdbcc050c7c2c50d33da2bc14ba861f74ec111f0.tar.gz
txr-bdbcc050c7c2c50d33da2bc14ba861f74ec111f0.tar.bz2
txr-bdbcc050c7c2c50d33da2bc14ba861f74ec111f0.zip
doc: undimensioned arrays may be flexible array members.
* txr.1: The documentation for array and zarray wrongly states that if the dimension is omitted, the type may not be used as a structure member. In fact, it may be used as the last member of a flexible structure.
-rw-r--r--txr.113
1 files changed, 9 insertions, 4 deletions
diff --git a/txr.1 b/txr.1
index e4321a84..6b2a696b 100644
--- a/txr.1
+++ b/txr.1
@@ -80304,8 +80304,11 @@ element, it denotes a variable length
array. It corresponds to the concept of an incomplete array
in the C language, except that no implicit array-to-pointer conversion
concept is implemented in the FFI type system. This type may not
-be used as an array element or structure member. It also may not
+be used as an array element or structure member, other than as the
+last structure member. It also may not
be passed or returned by value, only by pointer.
+If the last member of a structure has this type, then it is a flexible
+array member; see the Flexible Structures section below.
Since the type has unknown length, it has a trivial get operation which returns
.codn nil .
@@ -80419,9 +80422,11 @@ syntax which omits the
.meta dim
argument specifies a null-terminated variant of the variable-length array.
Like that type, it corresponds to the concept of an incomplete
-array in the C language. It may not be used as an array element
-or structure member, and cannot be passed as an argument or returned
-as a value.
+array in the C language. It may not be used as an array element,
+and may not be used as a structure member other than the last member.
+It cannot be passed as an argument or returned as a value.
+If the last member of a structure has this type, then it is a flexible
+array member; see the Flexible Structures section below.
Unlike the ordinary variable-length
.codn array ,