Hacker News new | ask | show | jobs
by marvy 2102 days ago
I think foo::args should be a normal struct type, so sizeof(foo::args) would follow the usual rules, just as if someone had manually written

struct foo_args{char a; short b; long c; float d; etc...}

and then asked for sizeof(foo_args).

1 comments

I have thought about it a little more, and I think it's the right solution as well.

From the first proposal the compiler can directly prepare the stack for the call.

As in this example: https://godbolt.org/z/f17szP