[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 12 05:48:43 PDT 2024


AaronBallman wrote:

> We were compiling simple testcase with complex parameters with clang and it was crashing because libraries was built using gcc.
> 
> @AaronBallman, Reason for new flag was to enable this for other C standards as well. Currently we use c11 as standard in VxWorks toolchain, which has to work with gcc compiled libraries. gcc with c11 as well passes complex parameters in GPRs.

Ah, perhaps I was unclear -- I'm not opposed to the flag existing so users can opt into/out of it as they want. I'm wondering why the flag needs to be specified when compiling with `-triple powerpc-unknown-linux-gnu` (because that specifies a GNU environment with a powerpc target) or with `-triple powerpc -std=gnu<whatever>` (because that specifies GNU extensions with a powerpc target). It seems to me that the flag should be implied in those cases, so users shouldn't have to specify it manually, right?

https://github.com/llvm/llvm-project/pull/77732


More information about the cfe-commits mailing list