🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.bugs.4bsd
Article #1618

Nasty 4.3 change to cc(1)

#1618
From: das
Date: Tue, 05 Aug 1986 01:17
26 lines
1585 bytes
Under SysV, 4.1, and 4.2,
	cc -c -o blah blah1.c blah2.c
	  produces two object files, named blah1.o and blah2.o
	cc -c -o blah blah.c
	  produces one object file, named blah.o
Under 4.3,
	cc -c -o blah blah1.c blah2.c
	  produces two object files, named blah1.o and blah2.o
	cc -c -o blah blah.c
	  produces one object file, named blah, not blah.o!!!!

While normal people don't usually specify both the -c flag and -o filename,
some shell scripts do (e.g. the C++ script "CC").  Obviously, someone decided
that -o should mean "If there's a single obvious output file, -o should
rename it," rather than "-o should rename the a.out file", since 
	cc -S -o blah blah.c
puts the assembly language output in blah, not blah.s (again, only when exactly
one source file is named).

I think the change is a mistake, since it breaks existing software and there's
no compelling reason I can see to prefer the new meaning of -o over the old.
Justifications?

-- David Smallberg, das@locus.ucla.edu, {sdcrdcf,ucbvax}!ucla-cs!das

-- David Smallberg, das@locus.ucla.edu, {sdcrdcf,ucbvax}!ucla-cs!das
Technical Details
Message-ID: <377@curly.ucla-cs.ARPA>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!caip!ucla-cs!das

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!caip!ucla-cs!das
From: das@LOCUS.UCLA.EDU
Newsgroups: net.bugs.4bsd
Subject: Nasty 4.3 change to cc(1)
Message-ID: <377@curly.ucla-cs.ARPA>
Date: Mon, 4-Aug-86 21:17:26 EDT
Article-I.D.: curly.377
Posted: Mon Aug  4 21:17:26 1986
Date-Received: Tue, 5-Aug-86 22:48:50 EDT
Reply-To: das@LOCUS.UCLA.EDU (David Smallberg)
Organization: UCLA Computer Science Department
Lines: 26