From: ferreira@torolab6.VNET.IBM.COM (John Ferreira)
Date: Mon, 25 Jan 93 09:16:14 EST
Newsgroups: comp.unix.aix
Subject: Re: xlC++ Severe Compiler Error
Organization: IBM Canada
Disclaimer: This posting represents the poster's views, not those of IBM
News-Software: UReply 3.0
            <1jrv1uINN3lf@chnews.intel.com>

In <1jrv1uINN3lf@chnews.intel.com> Tom McConnell~ writes:
>In article <19930122.052714.669@almaden.ibm.com>, kraemerf@franvm3.VNET.IBM.COM (Frank Kraemer) writes:
>> .
>>
>> One of my customers (University of Kassel) send me the following
>> small C++ program and complained that the xlC++ compiler does
>> not work as it should be. He is running on AIX 3.2.3 level.
>>
>> Yes, I'm the proud owner of a C++ book, bought at Palo Alto
>> in march 1991 - it's a nice looking book but I never touched
>> more than the table of contents with my eyes, but my friends
>> are very impressed.........
>>
>> So the question to the audience is, is this real good C++ style or
>> is our comipler buggy.......
>
>  <stuff deleted>
>
>> > That's the output:
>> >
>> > Variations for 1/2 (in C++):
>> >
>> >  a = 0 should be 0.0
>> >  b = 0 should be 0.5
>> >  c = 1 should be 1.0
>> >  d = 1 should be 1.5
>> >  e = 0.5 shoulbe d 0.5
>> >  f = 0 should be 0.5
>> >  g = 0.5 shoulbe d 0.5
>> >  h = 0 should be 0.0 (!)
>> >
>> > ////////////////////////////////////////////////////////
>>
>> thanks for your comments
>>
>> -frank-
>
>  Here is the output of your program using an RS/6000 550, AIX-3.1.5,
>g++-2.3.3, libg++-2.3:
>
>Variations for 1/2 (in C++):
>
> a = 0 should be 0.0
> b = 0.5 should be 0.5
> c = 1 should be 1.0
> d = 1.5 should be 1.5
> e = 0.5 should be 0.5
> f = 0.5 should be 0.5
> g = 0.5 should be 0.5
> h = 0 should be 0.0 (!)
>
>  Using an RS/6000 560, AIX-3.2.2, g++-2.3.3, libg++-2.3:
>
>Variations for 1/2 (in C++):
>
> a = 0 should be 0.0
> b = 0.5 should be 0.5
> c = 1 should be 1.0
> d = 1.5 should be 1.5
> e = 0.5 should be 0.5
> f = 0.5 should be 0.5
> g = 0.5 should be 0.5
> h = 0 should be 0.0 (!)
>
>  Using and NCR 3350, SVR4, g++-2.3.3, libg++-2.3:
>
>Variations for 1/2 (in C++):
>
> a = 0 should be 0.0
> b = 0.5 should be 0.5
> c = 1 should be 1.0
> d = 1.5 should be 1.5
> e = 0.5 should be 0.5
> f = 0.5 should be 0.5
> g = 0.5 should be 0.5
> h = 0 should be 0.0 (!)
>
>  etc., etc.
>
>    Cheers,
>
>    Tom McConnell
>
> Tom McConnell          |     Internet: tmcconne@sedona.intel.com
> Intel, Corp. C3-91     |     Phone: (602)-554-8229
> 5000 W. Chandler Blvd. | The opinions expressed are my own. No one in
> Chandler, AZ  85226    | their right mind would claim them.
>--
> Tom McConnell          |     Internet: tmcconne@sedona.intel.com
> Intel, Corp. C3-91     |     Phone: (602)-554-8229
> 5000 W. Chandler Blvd. | The opinions expressed are my own. No one in
> Chandler, AZ  85226    | their right mind would claim them.
>

Using XL C++ 1.1.1 on 3.2.1, I get:
 a = 0 should be 0.0
 b = 0.5 should be 0.5
 c = 1 should be 1.0
 d = 1.5 should be 1.5
 e = 0.5 should be 0.5
 f = 0.5 should be 0.5
 g = 0.5 should be 0.5
 h = 0 should be 0.0 (!)

What is the date of the compiler your customer has?
John Ferreira
Newsgroups: comp.unix.aix