On Mon, 26 Aug 2013, Joern Rennecke wrote:
avr currently shows the following failure:
FAIL: c-c++-common/vector-scalar.c -Wc++-compat (test for excess errors)
Excess errors:
/home/amylaar/atmel/4.8/unisrc-mainline/gcc/testsuite/c-c++-common/vector-scalar
.c:9:34: error: invalid operands to binary | (have '__vector(8) int' and
'veci')
The issue is that when we compute the result of an operatiopn of a veci and
an int, we get a __vector(8) int result (int is the same size as short),
Maybe we could change that?
yet the typechecking later does not accept the vectors as compatible.
Fixed by relaxing the latter for the case that int and short are the same
size.
If you do this, maybe rename the function, or at least expand the comment,
to make it clear that it should only be used for comparison operators with
vectors?
The issue seems larger than just short/int. On x86, (l<l)<l fails to
compile for a vector of long, with l<l that has opaque type vector of int,
that seems wrong.
--
Marc Glisse