efriedma-quic wrote: C standard rules for va_arg: "[...] if *type* is not compatible with the type of the actual next argument [...], the behavior is undefined [...]". A struct is never compatible with an array, so yes , it's undefined. (See 6.2.7 for what constitutes a "compatible type".)
As a practical matter, breaking the "compatible type" rule can cause crashes or data corruption. Modern ABIs don't just pass everything on the stack. https://github.com/llvm/llvm-project/pull/119563 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits