From owner-freebsd-hackers Sun Aug 9 15:01:00 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA28317 for freebsd-hackers-outgoing; Sun, 9 Aug 1998 15:01:00 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from smtp02.primenet.com (smtp02.primenet.com [206.165.6.132]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA28306 for ; Sun, 9 Aug 1998 15:00:58 -0700 (PDT) (envelope-from tlambert@usr04.primenet.com) Received: (from daemon@localhost) by smtp02.primenet.com (8.8.8/8.8.8) id PAA22990; Sun, 9 Aug 1998 15:00:32 -0700 (MST) Received: from usr04.primenet.com(206.165.6.204) via SMTP by smtp02.primenet.com, id smtpd022985; Sun Aug 9 15:00:29 1998 Received: (from tlambert@localhost) by usr04.primenet.com (8.8.5/8.8.5) id PAA20417; Sun, 9 Aug 1998 15:00:22 -0700 (MST) From: Terry Lambert Message-Id: <199808092200.PAA20417@usr04.primenet.com> Subject: Re: C and static initialization with unions To: mike@smith.net.au (Mike Smith) Date: Sun, 9 Aug 1998 22:00:22 +0000 (GMT) Cc: jdp@polstra.com, rivers@dignus.com, hackers@FreeBSD.ORG In-Reply-To: <199808082206.PAA02145@antipodes.cdrom.com> from "Mike Smith" at Aug 8, 98 03:06:45 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 > 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. I have a number of programs which I like to use, but which I do not want to become the maintainer of (for one thing, I don't have a huge FTP server and can't offer cvsup, etc.). These programs do things like modify declared strings (on the assumption that they will be stored in data section, not code section, what with them being data, and all...). They also do things like modify variables in signal handlers and in subfunctions of functions that also use the variable. Without the -traditional flag, this would require the use of the "volatile" keyword. Other examples exist, including the use of int arguments to implement varaddic functions, and casting to char * instead of void * for opaque conversion. Sure, it's be nice if there were three of me (;-)) and I could do all this and the stuff that I want to do as well, but there aren't, and I can't. > If we support compilation of K&R application code, we should attempt to > make sure that system headers function correctly in that regard. Yes, please. 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