Closed mattkretz closed 7 years ago
Hmm, this probably needs no extra work/wording. Because ushort <op> ushort -> int
but datapar<ushort> <op> datapar<ushort> -> datapar<ushort>
. Since the former loses its unsigned property UB is expected. The latter stays unsigned, so it requires modulo arithmetic.
Normally
ushort(~ushort()) * ushort(~ushort())
is UB, because of the promotion to signedint
. Do we want that behavior fordatapar<unsigned short/char>
too? I'm strongly against keeping this strange behavior.