[PATCH] Fix PR21082 for C++

Richard Guenther richard.guenther@gmail.com
Sun Apr 24 18:18:00 GMT 2005


On 4/24/05, Richard Henderson <rth@redhat.com> wrote:
> On Sun, Apr 24, 2005 at 07:32:38PM +0200, Richard Guenther wrote:
> > It happens that they don't match all the time.  See the hoops the
> > caller of extract_array_ref jumps through.  I.e. the types are different
> > from TYPE_DOMAIN of the array even if they are not constants.
> 
> Then cast to the TYPE_DOMAIN type first?

While this would be possible, I fail to see the advantage of doing this.
You will end up in (ptrdiff_t)((domain_t)i - (domain_t)j) instead of
(ptrdiff_t)i - (ptrdiff_t)j.  Are you concerned about correctness or about
more folding oportunities here?

Richard.



More information about the Gcc-patches mailing list