https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122581
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
That commit on that testcase should just change the TYPE_NO_NAMED_ARGS_STDARG_P
bit (set it), so that the function is treated like C23 (...) rather than like
C17 ().
Does it hang or whatever even without -fnon-call-exceptions?
Or if you do
struct a {
short b : -1ULL;
};
void c(int d, ...) { c(0, a()); }
(in that case it should behave the same for C++ < 26 and C++26).
Or
struct a {
short b : -1ULL;
};
void e(...);
void c() { e(a()); }
?
Or in C23
struct a {
short b : -1ULL;
};
void c(...) { c((struct a){}); }
In any case, struct a has huge size (all of virtual memory), so it is just
about how to handle that invalid case gracefully.