Microsoft C v5.1 bug
Erik Talvola
talvola at cory.Berkeley.EDU
Mon Apr 17 07:25:12 AEST 1989
I noticed that someone else posted a Microsoft C bug, so I thought I'd
post my favorite one. I haven't yet sent this to Microsoft, because all
my registration stuff is at home (while I'm at school...), but maybe
someone from Microsoft will see it (unlikely).
The program:
---------------------------------------------------------
main(int argc, char **argv)
{
unsigned char workbm[16][16];
unsigned char colors[16][16];
unsigned char pic[8][4][8][2];
int i,j,k;
pic[i][(j>=8)*2][j % 8][0] += workbm[k][j];
pic[i][(j>=8)*2][j % 8][1] = colors[k][j];
}
---------------------------------------------------------
Yes, it looks hideous, but look at the result of a compilation with
Compact or Large model...
C:\UC> cl -AC editbug.c
Microsoft (R) C Optimizing Compiler Version 5.10
Copyright (c) Microsoft Corp 1984, 1985, 1986, 1987, 1988. All rights reserved.
editbug.c
editbug.c(8) : fatal error C1001: Internal Compiler Error
(compiler file '@(#)code.c:1.46', line 393)
Contact Microsoft Technical Support
----------------------------------------------------------
The problem does not exist under Quick C, only Microsoft C, and only appears
when Compact or Large model is used. Has anyone else ever had Microsoft C
give them an Internal Compiler Error?
--
Erik Talvola | "It's just what we need... a colossal negative
talvola at cory.berkeley.edu | space wedgie of great power coming right at us
..!ucbvax!cory!talvola | at warp speed." -- Star Drek
More information about the Comp.lang.c
mailing list