From owner-freebsd-hackers Tue Jan 13 20:29:44 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA11908 for hackers-outgoing; Tue, 13 Jan 1998 20:29:44 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from wcc.wcc.net (wcc.wcc.net [208.6.232.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA11892 for ; Tue, 13 Jan 1998 20:29:36 -0800 (PST) (envelope-from piquan@wcc.wcc.net) Received: from detlev.UUCP (tnt167.wcc.net [208.10.139.167]) by wcc.wcc.net (8.8.7/8.8.7) with ESMTP id WAA21313 for ; Tue, 13 Jan 1998 22:26:22 -0600 (CST) Received: (from joelh@localhost) by detlev.UUCP (8.8.8/8.8.7) id WAA03843; Tue, 13 Jan 1998 22:29:41 -0600 (CST) (envelope-from joelh) Date: Tue, 13 Jan 1998 22:29:41 -0600 (CST) Message-Id: <199801140429.WAA03843@detlev.UUCP> To: freebsd-hackers@FreeBSD.ORG In-reply-to: (message from Michael Hancock on Tue, 13 Jan 1998 11:30:56 +0900 (JST)) Subject: Re: sharable static arrays? From: Joel Ray Holveck Reply-to: joelh@gnu.org References: Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk >> He said static, not const. There's a difference. Static data can be >> modified, it's just by inference hidden from higher scopes. > Putting a const in front of a variable just makes the value read-only thru > that symbol. Is it not an error to change the value of a const variable through another symbol? const int foo = 69; int*bar; bar = &foo; /* This frequently issues a compile/lint-time warning. */ *bar++; (And when I say "an error", I am referring to the nasal demon type of error, not the compiler or runtime diagnostic type of error.) Thanks, joelh -- Joel Ray Holveck - joelh@gnu.org - http://www.wp.com/piquan Fourth law of programming: Anything that can go wrong wi sendmail: segmentation violation - core dumped