This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Stricter implicit conversions between vectors, revised patch
- From: Mark Shinwell <shinwell at codesourcery dot com>
- To: Gerald Pfeifer <gerald at pfeifer dot com>
- Cc: gcc patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 08 Jan 2007 09:57:08 +0000
- Subject: Re: Stricter implicit conversions between vectors, revised patch
- References: <458ABCF8.3020504@codesourcery.com> <458BB0B6.6000200@lu.unisi.ch> <458BB4C5.3030000@codesourcery.com> <458BDF2B.9030208@codesourcery.com> <458D7960.1040604@codesourcery.com> <Pine.LNX.4.64.0612280947580.9665@acrux.dbai.tuwien.ac.at>
Gerald Pfeifer wrote:
On Sat, 23 Dec 2006, Mark Shinwell wrote:
These have now been sorted. This patch has no regressions on
x86_64-unknown-linux-gnu and powerpc64-unknown-linux-gnu. OK to apply?
If/when this goes in, would you mind adding something to
gcc-4.3/changes.html as well describing the stricter behavior
and the new option?
Is this OK?
Mark
--
2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
* changes.html (C family): Describe new restrictions on
implicit conversions between generic vector types.
Index: changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.3/changes.html,v
retrieving revision 1.17
diff -U3 -r1.17 changes.html
--- changes.html 7 Jan 2007 05:00:08 -0000 1.17
+++ changes.html 8 Jan 2007 09:53:48 -0000
@@ -79,6 +79,23 @@
<h3>C family</h3>
+ <ul>
+ <li>
+ Implicit conversions between generic vector types are now
+ only permitted when the two vectors in question have the same number
+ of elements and compatible element types. (Note that the restriction
+ involves <em>compatible</em> element types, not
+ implicitly-convertible element types: thus, a vector type with element
+ type <code>int</code> may not be implicitly converted to a vector
+ type with element type <code>unsigned int</code>.)
+ This restriction, which is in line with specifications for SIMD
+ architectures such as AltiVec, may be relaxed using the
+ flag <code>-flax-vector-conversions</code>.
+ This flag is intended only as a compatibility measure and should not
+ be used for new code.
+ </li>
+ </ul>
+
<h3>C++</h3>
<ul>
<li>Experimental support for the upcoming ISO C++ standard, C++0x,