]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/c-family/c-common.c
2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Aug 2011 14:44:02 +0000 (14:44 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Aug 2011 14:44:02 +0000 (14:44 +0000)
commit7dfa155b0b11c07d4bebe38f9d27e2ec9f2646ae
tree1a68ab24120fe0d7e02fe83b3b5e700f8d676001
parent957d03614dc8a98ff6ca330d21272a4ffdade0bf
2011-08-10  Artjoms Sinkarovs <artyom.shinakroff@gmail.com>

* c-typeck.c (scalar_to_vector): New function. Try scalar to
vector conversion.
(stv_conv): New enum for scalar_to_vector return type.
(build_binary_op): Adjust.
* doc/extend.texi: Description of scalar to vector expansion.

c-family/
* c-common.c (unsafe_conversion_p): New function. Check if it is
unsafe to convert an expression to the type.
(conversion_warning): Adjust, use unsafe_conversion_p.
* c-common.h (unsafe_conversion_p): New function declaration.

testsuite/
* gcc.c-torture/execute/scal-to-vec1.c: New test.
* gcc.c-torture/execute/scal-to-vec2.c: New test.
* gcc.c-torture/execute/scal-to-vec3.c: New test.
* gcc.dg/scal-to-vec1.c: New test.
* gcc.dg/scal-to-vec2.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177622 138bc75d-0d04-0410-961f-82ee72b054a4
12 files changed:
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/c-family/c-common.h
gcc/c-typeck.c
gcc/doc/extend.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/scal-to-vec1.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/scal-to-vec2.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/scal-to-vec3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/scal-to-vec1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/scal-to-vec2.c [new file with mode: 0644]