Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!oliveb!felix!info-ultrix From: eric@skatter.uucp (Eric Norum) Newsgroups: comp.unix.ultrix Subject: vcc wastes disk space Message-ID: <81568@felix.UUCP> Date: 30 Jan 89 21:13:29 GMT Sender: info-ultrix@felix.UUCP Reply-To: eric@skatter.uucp (Eric Norum) Lines: 48 Approved: zemon@felix.UUCP Reply-Path: Reply-to: eric@skatter.uucp (Eric Norum) Recompiling a bunch of stuff with DEC's `vcc' made our disk free space disappear. Problem: DEC's VAX C compiler seems intended to help DEC sell disk drives. Uninitialized static variables end up in the data segment instead of the bss segment. Software: Tested on ULTRIX 2.2 and ULTRIX 2.3 Hardware: Tested on MicroVAX II and VAX-11/750 Problem probably exists on all VAX machines. Repeat-By: Compile the following program with `cc' and 'vcc': static int foo[30000]; main () { printf ("Hello world.\n"); } Check the difference in size: % cc foo.c % size a.out text data bss dec hex 4096 1024 119476 124596 1e6b4 % ls -l a.out -rwxr-xr-x 1 eric 8192 Jan 24 08:28 a.out % vcc foo.c % size a.out text data bss dec hex 4096 120832 0 124928 1e800 % ls -l a.out -rwxr-xr-x 1 eric 127083 Jan 24 08:29 a.out Fix: I am hoping someone out there can tell me....... Eric Norum eric@skatter.USask.ca Electrical Engineer Accelerator Laboratory UUCP: ...!alberta!dvinci!skatter!eric University of Saskatchewan BITNET: NORUME@SASK