Henri Verbeet hverbeet@codeweavers.com writes:
For MSVC style handling of aggregate return values. This probably doesn't make anyone particularly happy; I'm open to suggestions. It may be possible to do this without an attribute, based on the function declaration, but then we'd have to figure out how MSVC decides when to use registers and when to use the stack for the return value.
The attribute is certainly ugly. Also it seems to me you are doing this the wrong way around; you don't want to add a return parameter, you want to avoid one. Check how div() is handled.