summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-12-18 22:48:04 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-12-18 22:48:04 +0000
commit7cbb7f1ae0d41d7c89ad3230a211bc6a76c0fa1f (patch)
tree0f1e25988565e7ea592b7df8cdc506fc8bd0a2d3
parent421f95120ea62307a59c125b8d9eb3084c31670b (diff)
downloadppe42-gcc-7cbb7f1ae0d41d7c89ad3230a211bc6a76c0fa1f.tar.gz
ppe42-gcc-7cbb7f1ae0d41d7c89ad3230a211bc6a76c0fa1f.zip
PR c/39464
* c-typeck.c (convert_for_assignment): For -Wpointer-sign warning require that both c_common_unsigned_type as well as c_common_signed_type is the same for both mvl and mvr types. * gcc.dg/pr39464.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194594 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/c/ChangeLog7
-rw-r--r--gcc/c/c-typeck.c6
-rw-r--r--gcc/testsuite/ChangeLog5
3 files changed, 16 insertions, 2 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index e6ef408a697..f2ee562cf4b 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,10 @@
+2012-12-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/39464
+ * c-typeck.c (convert_for_assignment): For -Wpointer-sign
+ warning require that both c_common_unsigned_type as well as
+ c_common_signed_type is the same for both mvl and mvr types.
+
2012-11-16 Diego Novillo <dnovillo@google.com>
Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
index 2032f66f363..6dddf7abd99 100644
--- a/gcc/c/c-typeck.c
+++ b/gcc/c/c-typeck.c
@@ -5543,8 +5543,10 @@ convert_for_assignment (location_t location, tree type, tree rhs,
if (VOID_TYPE_P (ttl) || VOID_TYPE_P (ttr)
|| (target_cmp = comp_target_types (location, type, rhstype))
|| is_opaque_pointer
- || (c_common_unsigned_type (mvl)
- == c_common_unsigned_type (mvr)))
+ || ((c_common_unsigned_type (mvl)
+ == c_common_unsigned_type (mvr))
+ && c_common_signed_type (mvl)
+ == c_common_signed_type (mvr)))
{
if (pedantic
&& ((VOID_TYPE_P (ttl) && TREE_CODE (ttr) == FUNCTION_TYPE)
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index e2044088cf4..f5c4184d965 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2012-12-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/39464
+ * gcc.dg/pr39464.c: New test.
+
2012-12-18 Ian Lance Taylor <iant@google.com>
PR go/55201
OpenPOWER on IntegriCloud