------- Comment #7 from rguenther at suse dot de  2006-04-05 10:47 -------
Subject: Re:  [4.1/4.2 Regression] Unable to
 determine # of iterations for a simple loop

> > would be much better here.  The question is of course, if the programmer
> > is allowed to write
> > 
> >  x + (size_t)-1
> > 
> > and expect the result to be defined.
> 
> if I understand the C standard correctly, no, this has undefined behavior.

This is also my understanding, so we should try to avoid creating the
above in the frontends.  But of course, as discussed, this doesn't solve
the problem (does it, for constant offsets?).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27039

Reply via email to