[cfe-dev] About option `-flax-vector-conversions`
Zeson Wu via cfe-dev
cfe-dev at lists.llvm.org
Tue Nov 29 02:03:18 PST 2016
Hi, all.
I am considering that why the default value of -flax-vector-conversions is
open. I am supposed to turn off this option as default, which is forbidding
implicit vector conversions between different vector type. If you really
need conversion, use explicit conversion operator.
I think this option would cover potential bugs. I am developing in PPC
platform about altivec. With `-fno-lax-vector-conversions` option, I can
find some bugs in altivec.h easily in compile-time. There is also a related
bug report about this option.https://llvm.org/bugs/show_bug.cgi?id=17164
Anyway, it's better to forbid implicit vector conversions between different
vector type. Instead, use explicit conversion operation as needed. Now, the
altivec.h can not compiled successfully with
`-fno-lax-vector-conversions`since a lot of explicit conversion operators
are needed add.
--
Zeson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20161129/19c9c776/attachment.html>
More information about the cfe-dev
mailing list