asb added a comment.

In https://reviews.llvm.org/D40023#933464, @majnemer wrote:

> So how does something like the following work:
>
>   union U { float f; int i; };
>   void f(union U u);
>   
>
> The flattening described in 
> https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md#hardware-floating-point-calling-convention
>  makes sense for arrays and structs but I couldn't find where unions were 
> described.


You're right that's not currently described - I have an issue tracking this 
here: https://github.com/riscv/riscv-elf-psabi-doc/issues/24. Last time I tried 
to check gcc behaviour it seemed that such cases would be passed according to 
the integer calling convention, but I'd be happier if one of the GCC devs would 
confirm.


https://reviews.llvm.org/D40023



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to