aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorJoern Rennecke <joern.rennecke@embecosm.com>2013-09-08 06:16:24 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>2013-09-08 07:16:24 +0100
commit0af94e6f263316ba608487859827f87696bbf377 (patch)
tree0f2eee7eebbfbdf1341ac9855aa139be01e1a520 /gcc/c
parentdde03143093de0c0fff6f424dd0676ab5d005bbb (diff)
downloadgcc-0af94e6f263316ba608487859827f87696bbf377.zip
gcc-0af94e6f263316ba608487859827f87696bbf377.tar.gz
gcc-0af94e6f263316ba608487859827f87696bbf377.tar.bz2
c-common.c (same_scalar_type_ignoring_signedness): Delete.
gcc/c-family: * c-common.c (same_scalar_type_ignoring_signedness): Delete. (vector_types_compatible_elements_p): New function. * c-common.h: (same_scalar_type_ignoring_signedness): Delete declaration. (vector_types_compatible_elements_p): Declare. gcc/c: * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p. gcc/cp: * typeck.c (cp_build_binary_op): Use vector_types_compatible_elements_p. gcc/testsuite: * c-c++-common/opaque-vector.c: New test. From-SVN: r202364
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/ChangeLog4
-rw-r--r--gcc/c/c-typeck.c7
2 files changed, 7 insertions, 4 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index 3401228..1b4b297 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,7 @@
+2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
+
+ * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
+
2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
* c-objc-common.c (c_tree_printer): Tidy.
diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
index f29ca04..e52533e 100644
--- a/gcc/c/c-typeck.c
+++ b/gcc/c/c-typeck.c
@@ -9987,7 +9987,7 @@ build_binary_op (location_t location, enum tree_code code,
if (code0 == VECTOR_TYPE && code1 == VECTOR_TYPE)
{
tree intt;
- if (TREE_TYPE (type0) != TREE_TYPE (type1))
+ if (!vector_types_compatible_elements_p (type0, type1))
{
error_at (location, "comparing vectors with different "
"element types");
@@ -10124,7 +10124,7 @@ build_binary_op (location_t location, enum tree_code code,
if (code0 == VECTOR_TYPE && code1 == VECTOR_TYPE)
{
tree intt;
- if (TREE_TYPE (type0) != TREE_TYPE (type1))
+ if (!vector_types_compatible_elements_p (type0, type1))
{
error_at (location, "comparing vectors with different "
"element types");
@@ -10230,8 +10230,7 @@ build_binary_op (location_t location, enum tree_code code,
if (code0 == VECTOR_TYPE && code1 == VECTOR_TYPE
&& (!tree_int_cst_equal (TYPE_SIZE (type0), TYPE_SIZE (type1))
- || !same_scalar_type_ignoring_signedness (TREE_TYPE (type0),
- TREE_TYPE (type1))))
+ || !vector_types_compatible_elements_p (type0, type1)))
{
binary_op_error (location, code, type0, type1);
return error_mark_node;