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] Fix PR21082 for C++


Richard Guenther <richard.guenther@gmail.com> writes:

| 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?

Ins't there a sign-extention issue?

-- Gaby


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