rjmccall wrote: I also have trouble imagining why a target would ever want to make `va_copy` a non-trivial operation, and I suspect that in practice programmers do not reliably call `va_end` to clean up their iterations. In general, I would say that platforms should be moving towards making varargs *simpler* by just treating variadic arguments differently from required arguments in the ABI, the way AArch64 originally did and still does on Apple platforms.
I wouldn't want to lock us out of supporting a target that required a non-trivial `va_copy` for whatever awful reason, but we could be clear that it's only UB on such targets. I don't think we actually gain anything from making it UB; I can't imagine what optimizations that would enable. https://github.com/llvm/llvm-project/pull/98146 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits