[Bug c/88698] Relax generic vector conversions

amonakov at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Feb 4 15:33:00 GMT 2019


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

Alexander Monakov <amonakov at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #12 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
The union-of-vectors pattern from comment #6 has been added to the
documentation. I'm closing this bug, as I believe it's not really possible to
change type compatibility and related rules for the vector extension, mostly
because it's constrained by compatibility to earlier extensions like Altivec
(it would be nice if the documentation explained that, though). In some places
GCC may be able to relax requirements, making some previously invalid code
valid, but not vice versa. In C++ it's probably extra problematic because
making some expression valid has implications for template tricks like SFINAE.

(personally I don't like the status quo, ideally the rules would be the same
for scalar types and vector types as much as possible, but it's too late now;
likewise, relaxing vector conversions further than what is usually accepted for
scalar types sounds controversial)


More information about the Gcc-bugs mailing list