From owner-freebsd-hackers Fri Aug 7 00:40:16 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA18570 for freebsd-hackers-outgoing; Fri, 7 Aug 1998 00:40:16 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from smtp03.primenet.com (smtp03.primenet.com [206.165.6.133]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA18517 for ; Fri, 7 Aug 1998 00:40:10 -0700 (PDT) (envelope-from tlambert@usr08.primenet.com) Received: (from daemon@localhost) by smtp03.primenet.com (8.8.8/8.8.8) id AAA00997; Fri, 7 Aug 1998 00:39:49 -0700 (MST) Received: from usr08.primenet.com(206.165.6.208) via SMTP by smtp03.primenet.com, id smtpd000967; Fri Aug 7 00:39:41 1998 Received: (from tlambert@localhost) by usr08.primenet.com (8.8.5/8.8.5) id AAA23183; Fri, 7 Aug 1998 00:39:35 -0700 (MST) From: Terry Lambert Message-Id: <199808070739.AAA23183@usr08.primenet.com> Subject: Re: C and static initialization with unions To: jb@cimlogic.com.au (John Birrell) Date: Fri, 7 Aug 1998 07:39:35 +0000 (GMT) Cc: mike@smith.net.au, tlambert@primenet.com, Nicolas.Souchu@prism.uvsq.fr, chuckr@Glue.umd.edu, freebsd-hackers@FreeBSD.ORG In-Reply-To: <199808070232.MAA02971@cimlogic.com.au> from "John Birrell" at Aug 7, 98 12:32:23 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > Seeing as nobody actually seems to want this, it's obviously not of > > much interest. > > ... and these days it seems that the GNU tools get ported to the "older" > OS first and you just use them. I am sorry. I vehemently disagree with the GPL as a political tool. I will not port GCC to a new platform. I also believe that having to port the compiler is a ridiculous barrier to entry, and one of the reasons FreeBSD ports are not more prevalent. > So unless there is a late rush of people wanting to port FreeBSD to another > processor for which GNU tools don't exist, I'd prefer to see the K&R bit > dropped in favour of ANSI C and get people to learn to compile things with > compiler higher warning levels. It's perfectly possible to get these warnings from a K&R compiler. To do this, you need to change your object format to attribute the symbol table entries. Fred Fish did this for the Motorolla 88k compiler back in the early 80's. What we are suffering here is a legacy of compiler writers too lazy to implement decent smart linker technology. It is entirely possible to take interface errors at link time rather than compile time and/or generate conversion stubs an issue warnings, rather than requiring prototypes to be in scope. Prototypes are a case of compiler writers being lazy. Specifically, Microsoft compiler writers who wanted to transparently deal with "far *" in the Windows 3.x developement environement, and SunSoft compiler writers who wanted to win compiler races rather than provide correct code. This is the same reason we have volatile: because there is no inter-module optimization due to the lack of sufficient hints in the object files and the generation of glue code at link time instead of runtime. In any case, it's technically *possible* to have avoided this cock-up, it just wasn't financially expedient to do so... 8-(. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message