On Tue, Dec 18, 2012 at 11:10 AM, Radu Rendec <radu.ren...@cloudbit.ro>wrote:

> On Tue, 2012-12-18 at 10:29 -0600, Peter Bigot wrote:
>
> > Yes, it's obviously sign-extending the pointers and doing a 32-bit
> > subtraction.  I have a recollection that how mspgcc treated pointers
> > (signed/unsigned) changed sometime during the 4.7 development cycle.
> >
> > mspgcc-20120911 appears to do the right thing and generates a simple
> > 16-bit subtract.
>
> Hi Peter,
>
> Thanks for the fast answer! Casting the pointers to "unsigned int"
> before subtracting seems to be a valid workaround to the problem.
>
> Is there any chance of getting the right behaviour in 20120406, since
> it's supposed to be "LTS" ?
>

Not really.  The generated code is sub-optimal but the answer it produces
is correct.  I'd have to do a lot of testing to verify that changing the
signedness of pointers didn't introduce new problems, and even then I
couldn't trust the testing was complete.

FWIW, 20120911 is essentially solid, and I have no intentions to make
changes to it.  The reasons it's not officially LTS are influenced by lack
of time and motivation on my part.  I'd be more likely to fix such a
problem in that release, though the bar for fixes even there is pretty high
now that mspgcc is being superseded by the RH/TI upstream effort.

Peter
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to