Date: Tue, 13 Jan 1998 22:29:41 -0600 (CST) From: Joel Ray Holveck <joelh@gnu.org> To: freebsd-hackers@FreeBSD.ORG Subject: Re: sharable static arrays? Message-ID: <199801140429.WAA03843@detlev.UUCP> In-Reply-To: <Pine.SV4.3.95.980113113015.6376H-100000@parkplace.cet.co.jp> (message from Michael Hancock on Tue, 13 Jan 1998 11:30:56 %2B0900 (JST)) References: <Pine.SV4.3.95.980113113015.6376H-100000@parkplace.cet.co.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
>> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801140429.WAA03843>