This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] relax constraint on integral<->offset conversions (PR53336)


On 05/22/2012 12:38 PM, Richard Guenther wrote:
Can't be this patch though, it only lets more things pass the verifier.
Unless

-       /* Allow conversion from integer to offset type and vice versa.  */
+       /* Allow conversion from integral to offset type and vice versa.  */
        if ((TREE_CODE (lhs_type) == OFFSET_TYPE
-&&  TREE_CODE (rhs1_type) == INTEGER_TYPE)
+&&  INTEGRAL_TYPE_P (rhs1_type))
            || (TREE_CODE (lhs_type) == INTEGER_TYPE
-&&  TREE_CODE (rhs1_type) == OFFSET_TYPE))
+&&  INTEGRAL_TYPE_P (rhs1_type)))

the latter looks like a typo - INTEGRAL_TYPE_P should be used for
lhs_type, not rhs1_type.
Ok, thanks. If nobody beats me later today I will regtest and in case commit what you are suggesting.

Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]