diff options
author | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-08 06:16:24 +0000 |
---|---|---|
committer | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-08 06:16:24 +0000 |
commit | 73437615120de05275f9af5974f7ee261db9ba61 (patch) | |
tree | 0f2eee7eebbfbdf1341ac9855aa139be01e1a520 /gcc/c | |
parent | dd9940d23f9e9b8979289fa1bb9aa3ea5d4fdb72 (diff) | |
download | gcc-73437615120de05275f9af5974f7ee261db9ba61.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202364 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c')
-rw-r--r-- | gcc/c/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/c/c-typeck.c | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index 3401228c039..1b4b2977294 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 f29ca049649..e52533ecd6d 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; |