Path: utzoo!telly!attcan!uunet!mcvax!hp4nl!philmds!prle!cstw01!meulenbr From: meulenbr@cstw01.UUCP (Frans Meulenbroeks) Newsgroups: gnu.gcc.bug Subject: gcc 1.33 does not remove .o file Message-ID: <339@cstw01.UUCP> Date: 21 Feb 89 15:37:28 GMT Reply-To: meulenbr@cst.UUCP () Organization: Centre for Software Technology, Philips Eindhoven Lines: 70 Hi! Perhaps this is not a bug but a feature... I don't know if this is intended, but gcc 1.33 does not remove its .o file any more if called with gcc file.c. I seem to recall that previous versions of gcc did do this. This is a little annoying since it leaves .o files around when not needed. gnu make also will not remove these files. Example: w01$ ls x.c w01$ cat x.c main() { } w01$ gcc -v x.c gcc version 1.33 /usr/cstu20/gadgets/lib/gcc-cpp -v -undef -D__GNUC__ -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__HAVE_68881__ -Dmc68020 x.c /tmp/cca02412.cpp GNU CPP version 1.33 /usr/cstu20/gadgets/lib/gcc-cc1 /tmp/cca02412.cpp -quiet -dumpbase x.c -version -o /tmp/cca02412.s GNU C version 1.33 (68k, MIT syntax) compiled by GNU C version 1.33. as -mc68020 /tmp/cca02412.s -o x.o ld /lib/crt0.o /lib/Mcrt1.o x.o /usr/cstu20/gadgets/lib/gcc-gnulib -lc w01$ ls a.out x.c x.o w01$ rm a.out x.o w01$ ls x.c w01$ ~gadgets/bin/make -v CC=gcc x GNU Make version 3.29, by Richard Stallman and Roland McGrath. Copyright (C) 1988 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. gcc x.c -o x w01$ ls x x.c x.o w01$ Hmmm. let's see what sun cc does: w01$ rm x.o x w01$ ls x.c w01$ cc x.c w01$ ls a.out x.c Can anyone comment whether this is a bug or a feature. I could not find anything in the documentation which implies that a .o file should be removed. However, all other unix C compilers used to do this. I seem to recall that previous versions of gcc remove the .o file, and I could not find anything in the change log which describes this change. (o.k. I might need new glasses :-) :-) ) -- Frans Meulenbroeks (meulenbr@cst.prl.philips.nl) Centre for Software Technology ( or try: ...!mcvax!philmds!prle!cst!meulenbr)