This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Const bug


Andrew Apted <ajapted@netspace.net.au> writes:

| Hi,
| 
| I think I've found a bug in G++ (I'm not 100% sure it's a bug 
| but it does seem pretty counter-intuitive), where variables marked
| const are treated differently to non-const variables, almost like they
| were considered as static.  With optimisation on, the symbols don't
| appear in the object file at all.

That is not a bug, the behaviour you're seeing is a direct consequence
of the language semantics.  

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]