[RFTesting] New POINTER_DIFF_EXPR

Marc Glisse marc.glisse@inria.fr
Sat Nov 18 09:54:00 GMT 2017


On Fri, 17 Nov 2017, Jason Merrill wrote:

> It's not clear to me that cp_build_binary_op needs to handle
> POINTER_DIFF_EXPR, it should get MINUS_EXPR and produce
> POINTER_DIFF_EXPR.

Indeed, I added POINTER_DIFF_EXPR in many places by looking for
MINUS_EXPR, but this one is useless, regtesting passes without it.

>>>>         * tree.def: New tree code POINTER_DIFF_EXPR.
>
> The comment might mention that the value is the same for all pointer
> types, not divided by the size of the pointed-to type.

Good idea, thanks.

-- 
Marc Glisse



More information about the Gcc-patches mailing list