🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Dirk Grunwald Tue, 17 Oct 1989 18:21
static const vs. const
#510
Author: Dirk Grunwald
Date: Tue, 17 Oct 1989 18:21
18 lines
1108 bytes
I'm not certain if this is a bug or feature;
before, when I have the file:

----------foo.cc----------
const int notStatic = -1;
static const int isStatic = -1;
--------------------------

compiling & using nm would show that notStatic has space allocated;
this is useful if refer to it in other files as ``extern const int notStatic''.

the current version of g++ doesn't allocate a variable for either from.

if this is the intended action, than I would think that referring to
``extern const int notStatic'' should generate an error.

Dirk Grunwald -- Univ. of Colorado at Boulder	(grunwald@foobar.colorado.edu)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads