Article View: comp.bugs.misc
Article #6Hummm, Altos compiler bug/feature?
From: Larry Taborek
Date: Tue, 01 Aug 1989 21:06
Date: Tue, 01 Aug 1989 21:06
45 lines
1507 bytes
1507 bytes
Ok guys and gals.
I have a Altos 586 computer running 3.1a version of Xenix. In
using the standard compiler that comes with the development set,
I found that I can only do mathmatical operations on shorts and
integers. Floats, longs and doubles do not work. Example:
main()
{
int a;
long b;
a=0;b=0;
a++;
printf("a = %d\n",a);
a = a + 1;
printf("a = %d\n",a);
b++;
printf("b = %d\n",b);
b = b + 1;
printf("b = %d\n",b);
}
When run returns:
a = 1
a = 2
b = 0
b = 0
By the way, by using the sizeof command, I find that shorts and
integers take 2 bytes, longs and floats take 4 bytes and doubles
take 8 bytes.
I have looked in the compiler options to find out if there are
any floating point options. There arn't, or at least none
documented. Now I figure that you HAVE to be able to do this, so
what am I doing wrong?
Larry
--
Larry Taborek ..!uunet!grebyn!macom1!larry Centel Federal Systems
larry@macom1.UUCP 11400 Commerce Park Drive
Reston, VA 22091-1506
703-758-7000
Technical Details
Message-ID:
<4874@macom1.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!rutgers!netsys!macomh!macom1!larryShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!rutgers!netsys!macomh!macom1!larry From: larry@macom1.UUCP (Larry Taborek) Newsgroups: comp.bugs.misc Subject: Hummm, Altos compiler bug/feature? Keywords: cc, Altos, 586, Floating point Message-ID: <4874@macom1.UUCP> Date: 1 Aug 89 21:06:11 GMT Distribution: usa Organization: CENTEL Federal Systems, Reston, VA. 22091-1506 Lines: 45