Article View: comp.sys.amiga.tech
Article #3086Manx 5.0a bugs
From: Paul John Falstad
Date: Tue, 27 Mar 1990 00:11
Date: Tue, 27 Mar 1990 00:11
77 lines
1773 bytes
1773 bytes
The following is a series of code fragments that demonstrate bugs in Manx
5.0a. I have notified Manx of all these problems.
/* compiled with ccopts = -bs -hi inc: -mbe -papl0t -sn -wlopd */
/* program 1 */
/* gives internal errors */
typedef struct {
int hm,strg,dex;
} npc;
int Random(int);
void NewLevel(const int who)
{
npc *Npc;
Npc->strg += Random(2)+5;
Npc->dex += Random(2)+5;
Npc->hm += 100;
}
/* program 2 */
typedef enum {YES,NO} maybe;
void main(void),decide(maybe);
void main(void)
{
decide(YES); /* <- what's wrong with that? */
}
void decide(maybe not){return;}
/* program 3 */
typedef enum {YES,NO} maybe;
void SayHello(int,int,int,maybe,maybe,int,int,int);
void main(void)
{
SayHello(1,2,3,YES,NO,4,5,6);
}
void SayHello(int a,int b,int c,maybe d,maybe e,int f,int g,int h)
{
printf("%ld %ld %ld %ld %ld %ld\n",a,b,c,f,g,h);
printf("%ld %ld\n",d,e);
}
/* program 4 */
typedef enum {YES,NO} maybe;
struct choice {
maybe choice;
int count;
};
void main(void);
void main(void)
{
static struct choice pick = {NO,1};
printf("%ld\n",pick.choice); /* these two give wrong output */
printf("%ld\n",pick.count);
}
/* program 5 */
main()
{
printf("%s","A\x20" "B"); /* this gives wrong output */
}
Technical Details
Message-ID:
<14863@phoenix.Princeton.EDU>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!samsung!brutus.cs.uiuc.edu!rpi!uupsi!njin!princeton!phoenix!pfalstadShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!samsung!brutus.cs.uiuc.edu!rpi!uupsi!njin!princeton!phoenix!pfalstad From: pfalstad@phoenix.Princeton.EDU (Paul John Falstad) Newsgroups: comp.sys.amiga.tech Subject: Manx 5.0a bugs Message-ID: <14863@phoenix.Princeton.EDU> Date: 27 Mar 90 00:11:59 GMT Reply-To: pfalstad@phoenix.Princeton.EDU (Paul John Falstad) Organization: Princeton University, NJ Lines: 77