From owner-freebsd-hackers Sat Aug 8 15:08:18 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA00212 for freebsd-hackers-outgoing; Sat, 8 Aug 1998 15:08:18 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from antipodes.cdrom.com (castles250.castles.com [208.214.165.250]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA00207 for ; Sat, 8 Aug 1998 15:08:13 -0700 (PDT) (envelope-from mike@antipodes.cdrom.com) Received: from antipodes.cdrom.com (localhost [127.0.0.1]) by antipodes.cdrom.com (8.8.8/8.8.5) with ESMTP id PAA02145; Sat, 8 Aug 1998 15:06:45 -0700 (PDT) Message-Id: <199808082206.PAA02145@antipodes.cdrom.com> X-Mailer: exmh version 2.0zeta 7/24/97 To: John Polstra cc: Thomas David Rivers , hackers@FreeBSD.ORG Subject: Re: C and static initialization with unions In-reply-to: Your message of "Sat, 08 Aug 1998 14:04:51 PDT." <199808082104.OAA20050@austin.polstra.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 08 Aug 1998 15:06:45 -0700 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > Let me add to this discussion my (now somewhat tired) song regarding > > compiling older pre-ANSI software. > > > > It's very nice that we can 'turn off' "const", "volatile", > > prototypes in the header files; just for this purpose... > > > > Every now-and-then, a stray "const" seems to slip into the headers; > > which breaks some of my older software... > > How could that happen? We don't change your old software. We change > FreeBSD. FreeBSD is built using the FreeBSD compiler. That compiler > is not K&R, and it never will be K&R again. If you are using an old > compiler to compile FreeBSD header files, then I can only say, "Don't > do that." We have explicitly abandoned the goal of being compatible > with K&R compilers. > > If you mean that your old software isn't const-correct, then (a) > that's a compiler warning under FreeBSD, not an error, and (b) isn't > it about time you fixed your software? The ANSI/ISO C standard was > ratified almost 10 years ago. Surely everybody has had ample time to > get used to the idea by now. Unfortunately, they haven't. I've had (several) run-ins with const poisoning trying to port a large third-party codebase. It's sufficiently bogus to require -traditional to build, and I expect not too novel in that regard. If we support compilation of K&R application code, we should attempt to make sure that system headers function correctly in that regard. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message