[Bug c/87307] Implicit conversion from int to vector works, explicit is an error

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Sep 14 15:49:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87307

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>However when you try to perform explicit conversion, you will gen an error.
Right there is another reason why we don't want to support that is because we
support bitwise conversion between vector types and integer types of the same
size.  For an example:
uint64_t a;
__attribute__((vector_size(sizeof(uint64_t) ) )) uint16_t b = (uint64_t)a;


More information about the Gcc-bugs mailing list