-
Notifications
You must be signed in to change notification settings - Fork 163
Open
Description
Struct/union assignments are not currently allowed, since they require moving mem blocks:
struct foo s1, s2;
s1 = s2; // not allowedThat said, the AST tracks all the type information needed to support this. Assignment/copy just needs to be converted to a SYSC to memcpy(). Also, for function return values and parameters, the C-standard ABI conventions need to be followed. I looked at the C89 standard and didn't see it spelled out. Some compilers used to convert struct parameters to pointers automatically if the struct size exceeded a certain limit, and I am not sure what the rules are now.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels