6 ms·
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{ch
by marvy 6y 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).
- avianes 6y agoI 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 https://godbolt.org/z/f17szP