This is the mail archive of the gcc@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: [RFH] Folding of &a[-1]


On Wed, 16 Feb 2005 10:51:58 -0500, Andrew Pinski
<pinskia@physics.uc.edu> wrote:
> 
> On Feb 16, 2005, at 10:49 AM, Theodore Papadopoulo wrote:
> 
> > Then, I must add that I do not know much about the compiler's
> > internals...
> 
> If a[-1] os converted to a[(unsigned)-1], this is fine iff unsigned is
> the same size as pointers.

Ok, as the conversion is done to (int *) which is unsigned and of
course of size of pointers
it came to my mind that just casting back that one to signed for the
index arithmetic should work.
I'll try that.

Thanks for all the suggestions,
Richard.


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