1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-07 23:29:39 +00:00

Disallow pass/return of 3-byte struct (#2022), document capability added in #1102.

This commit is contained in:
bbbradsmith 2023-05-02 19:00:34 -04:00
parent 805e98a7aa
commit e7046a02ff
2 changed files with 2 additions and 4 deletions

View File

@ -806,9 +806,8 @@ and the one defined by the ISO standard:
<item> The datatypes "float" and "double" are not available.
<p>
<item> C Functions may not return structs (or unions), and structs may not
be passed as parameters by value. However, struct assignment *is*
possible.
<item> C Functions may return structs (or unions) by value, but only of
1, 2 or 4 byte sizes.
<p>
<item> Most of the C library is available with only the fastcall calling
convention (<ref id="extension-fastcall" name="see below">). It means

View File

@ -803,7 +803,6 @@ const Type* GetStructReplacementType (const Type* SType)
switch (SizeOf (SType)) {
case 1: NewType = type_uchar; break;
case 2: NewType = type_uint; break;
case 3: /* FALLTHROUGH */
case 4: NewType = type_ulong; break;
default: NewType = SType; break;
}