rjmccall wrote: *Every* `va_list` stores pointers; otherwise, it wouldn't be able to support an arbitrary number of arguments. Copying just copies the pointers, and that's fine because the memory they point to is immutable and always outlives the `va_list`. You can imagine a `va_list` implementation that doesn't have these properties, but it's hard.
> I'm not super happy about "this is well-defined if you happen to be on a > target that makes it well-defined" because there's basically no reasonable > way for a user to find that information out themselves. Well, if we're going to document that this is allowed, we should document what targets it's allowed on. I'm not arguing that we shouldn't document it. 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