I know what it does, I just didn't think there was any reason to write
"static" for a non-extern const.  The standard agrees:

3.5.3:
A name having namespace scope (3.3.5) has internal linkage if it is the name
of
— an object, reference, function or function template that is explicitly
declared static or,
— an object or reference that is explicitly declared const and neither
explicitly declared extern nor
previously declared to have external linkage; or

7.1.1:A name declared in a namespace scope without a storageclassspecifier
has external linkage unless it has
internal linkage because of a previous declaration and provided it is not
declared const. Objects declared
const and not explicitly declared extern have internal linkage.

On Thu, Jun 4, 2009 at 12:24 PM, <[email protected]> wrote:

> On 2009/06/03 15:30:41, Kevin Millikin wrote:
>
>> Why static?
>>
>
> I think it makes them local to compilation units including them, so they
> don't get exported in the linkage information.  They may also not take
> up room, in that case.  I don't know - I'll ask around.
>
>
> http://codereview.chromium.org/119082
>

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to