Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!orstcs!jacobs.CS.ORST.EDU!regan From: regan@jacobs.CS.ORST.EDU (Dave Regan) Newsgroups: comp.os.minix Subject: Bug in Minix C compiler Message-ID: <19169@orstcs.CS.ORST.EDU> Date: 2 Jul 90 00:31:11 GMT Sender: usenet@orstcs.CS.ORST.EDU Organization: Oregon State University - CS - Corvallis Lines: 31 While working with the "uux" program, I found a possible bug in the C compiler. Consider the following test file: char array1[1000] = "test"; char array2[1000]; Both of these arrays should be 2000 bytes long with "array1" having the first 5 bytes initialized. However, this is not what the compiler generates. Type: cc -S test.c libupack test.S You get the following: .globl _array1 .data _array1: | 3 words of storage .word 25972 .word 29811 .globl _array2 .word 0 .bss _array2: .zerow 1000/2 | 500 words of storage .text I am running with 1.5.10 and current compiler binaries. I am currently avoiding the problem by initializing arrays at runtime. I am sorry if this has been brought up before; I hadn't noticed before. regan@jacobs.cs.orst.edu