Open
Description
Passing 8 bit or 16 bit ints in varargs is undefined behavior.
Clang will alert us:
Second argument to 'va_arg' is of promotable type 'uint16_t' (aka 'unsigned short'); this va_arg has undefined behavior because arguments will be promoted to 'int'clang(-Wvarargs)
But we allow this in dart:ffi
, leading to undefined behavior.
We should consider adding an error message.
Discovered on: