Path: utzoo!mnetor!uunet!mcrware!jejones From: jejones@mcrware.UUCP (James Jones) Newsgroups: comp.lang.c Subject: Re: Does extern "const" allocate storage? Message-ID: <613@mcrware.UUCP> Date: 18 Mar 88 16:26:49 GMT References: <7712@apple.Apple.Com> <3034@haddock.ISC.COM> Organization: Microware Systems Corp., Des Moines, Ia. Lines: 12 Summary: can it *really* do that? In article <3034@haddock.ISC.COM>, karl@haddock.ISC.COM (Karl Heuer) writes: > Let's assume we're talking about a header file that is shared among multiple > modules. If you use "static int const foo=3;" and never take its address, a > good compiler ought to be able to inline it wherever it's used. Is this really true? As nearly as I can tell, "const" doesn't *really* mean "constant," it means "readonly" (which makes me wonder why the Committee chose such a highly misleading name for it). An example the Draft gives is of a variable that might represent a memory-mapped input port that cannot be assigned to (though, to be sure, that is declared "const volatile.") James Jones