Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!usc!cs.utexas.edu!uunet!mcsun!ukc!dcl-cs!gdt!gdr!mapmef From: mapmef@gdr.bath.ac.uk (M E Fletcher) Newsgroups: comp.lang.c Subject: Bug in Microsoft C 5.1 Message-ID: <1989Sep7.104322.1210@gdt.bath.ac.uk> Date: 7 Sep 89 10:43:22 GMT Reply-To: mapmef@gdr.bath.ac.uk (M E Fletcher) Distribution: comp.lang.c Organization: University of Bath, England Lines: 29 I've trimmed my program down substantially so there's for excuse at not looking at it now! I already know it's weird and horrible, but that's because it's from a larger program which has undergone major surgery. #include static unsigned modulo[9]={0,0,0,0,0,0,0,0,0}; main() {long *timeptr; int i; unsigned status; i=0; while (i!=9) {do {status=do_nothing(0,0,0); printf("%d\n",i); } while (0); do {status=do_nothing(0,0,modulo[i]);} while (status); i++; } } int do_nothing(a,b,c) int a,b,c; {return(0);} When I run this instead of printing out 0,1,2,3,4,5 etc. It prints out 0,1,1,1,1,1 etc. I think there is a bug in the compiler I am using : Micorsoft's 5.1 . Can anyone confirm/deny/reproduce this? Matthew Fletcher, University of Bath, England