Re: mspgcc "undefines" too-many-bits shifts in weird way

Grant Edwards <[email protected]>
Newsgroups gmane.comp.hardware.texas-instruments.msp430.gcc.user
Message-ID <[email protected]>
On 2013-04-21, Paul Sokolovsky <[email protected]> wrote:
> On Sun, 21 Apr 2013 17:06:51 -0500 Peter Bigot <[email protected]> wrote:
>
>> This decision was intentional, as documented in
>> https://sourceforge.net/p/mspgcc/bugs/118/.  My recollection is that
>> the choice of how to make things consistent was informed by similar
>> behavior in the contemporaneous gcc for x86 or at least one other
>> target architecture.
>
> Thanks for the reference. So, I tested it with x86 gcc 4.4, 4.5, 4.6,
> 4.7 (packages as shipped by Ubuntu), all of them produce
> mathematically expected result.

That's irrelevent.

> msp430-gcc 4.5.3, 4.7.0 both produce unexpected result.

That's per the standard.  If you write code that depends on some
particular behavior for somethign that's "undefined", then that code
is wrong.

-- 
Grant Edwards               grant.b.edwards        Yow! I'm wearing PAMPERS!!
                                  at               
                              gmail.com            


------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.