mo7sen wrote: > While you're here, maybe look at emitting an undefined-behavior warning for > this construct? A VLA is never compatible with a function argument: if you > try to write an array in an function type, it gets promoted to a pointer. So > this construct is guaranteed to produce broken results (which is why nobody > has tripped over this before).
Assuming the actual argument is a struct and the `va_arg(args, uint8_t[sizeof(struct)])` is just to get the struct bytes, would that still be considered undefined behaviour? 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