[clang] [C2y] Add documentation to conform to WG14 N3262; NFC (PR #98146)
John McCall via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 9 11:41:48 PDT 2024
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
More information about the cfe-commits
mailing list