Turbo C Problem?
Peter J. Holsberg
pjh at mccc.UUCP
Sun Feb 28 03:30:20 AEST 1988
In article <44100006 at hcx2> daver at hcx2.SSD.HARRIS.COM writes:
|
|
|The following dumb, little program is compiled with Turbo-C 1.0, running under
|MS-DOS 3.2. Shortly after starting up, the C compiler goes berserk. The
|screen flashes in reverse video and the operating system reboots itself.
|In a larger example, the auto-reboot does not take place, but the C compiler
|hangs up, the recommended "control-break to quit" has no effect, and I have
|to reboot the system anyway. What is going on? Is this a C compiler
|problem? Would there be any difference in version 1.5?
|
|#define R 41
|#define C 480
|main()
|{
| struct
| {
| unsigned a:1;
| } b[R][C];
|
| int i, j;
| for (i=0; i<R; ++i)
| for (j=0; j<C; ++j)
| {
| b[i][j].a = 0;
| }
|}
In version 1.5, your program compiles without error and, on execution,
does nothing.
--
Peter Holsberg UUCP: {rutgers!}princeton!mccc!pjh
Technology Division CompuServe: 70240,334
Mercer College GEnie: PJHOLSBERG
Trenton, NJ 08690 Voice: 1-609-586-4800
More information about the Comp.lang.c
mailing list