Menu

#204 struct: aggregate assignment

None
closed-fixed
None
9
2018-10-01
2007-05-01
No

Assignment of values to aggregates should be supported.

struct x
{
int a;
char b;
float d;
};

f(struct x *a, struct x *b)
{
*a = *b;
}

One solution would be to convert the *a = *b; into

memcpy(a, b, sizeof(x));

Philipp

Related

Patches: #285

Discussion

  • Philipp Klaus Krause

    • priority: 5 --> 8
     
  • Philipp Klaus Krause

    Increasing priority, since I'm encountering more and more software and libraries that rely on full struct support.

     
  • Philipp Klaus Krause

    Increasing priority, since aggregate and union handling is currently the main issue that prevents us from compiling ANSI C89 / ISO C90 code.

    Philipp

     
  • Philipp Klaus Krause

    • priority: 8 --> 9
     
  • Philipp Klaus Krause

    This is now implemented in the "next" branch. This RFe can be closed when it gets merged to trunk (probably soon afetr the 3.8.0 release).

    Philipp

     
  • Philipp Klaus Krause

    • status: open --> closed-fixed
    • assigned_to: Philipp Klaus Krause
    • Group: -->
     
  • Philipp Klaus Krause

    The branch has been merged in [r10592].

    Philipp

     

    Last edit: Maarten Brock 2018-10-15

Log in to post a comment.