Date: Sat, 08 Aug 1998 15:06:45 -0700 From: Mike Smith <mike@smith.net.au> To: John Polstra <jdp@polstra.com> Cc: Thomas David Rivers <rivers@dignus.com>, hackers@FreeBSD.ORG Subject: Re: C and static initialization with unions Message-ID: <199808082206.PAA02145@antipodes.cdrom.com> In-Reply-To: Your message of "Sat, 08 Aug 1998 14:04:51 PDT." <199808082104.OAA20050@austin.polstra.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808082206.PAA02145>