From: Jakub Jelinek Date: Tue, 18 Dec 2012 22:48:04 +0000 (+0100) Subject: re PR c/39464 (Attribute may_alias causes invalid warning) X-Git-Tag: releases/gcc-4.8.0~1322 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f8a93a2e9173149c4fad80cb9011d39a45e8d33e;p=thirdparty%2Fgcc.git re PR c/39464 (Attribute may_alias causes invalid warning) 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. From-SVN: r194594 --- diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index e6ef408a6973..f2ee562cf4ba 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,10 @@ +2012-12-18 Jakub Jelinek + + 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 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 2032f66f3631..6dddf7abd995 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 e2044088cf40..f5c4184d9652 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-12-18 Jakub Jelinek + + PR c/39464 + * gcc.dg/pr39464.c: New test. + 2012-12-18 Ian Lance Taylor PR go/55201