This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Const bug
- To: Andrew Apted <ajapted at netspace dot net dot au>
- Subject: Re: Const bug
- From: Gabriel Dos Reis <Gabriel dot Dos-Reis at cmla dot ens-cachan dot fr>
- Date: 05 Jul 2001 11:01:48 +0200
- Cc: gcc-bugs at gcc dot gnu dot org
- Organization: CMLA, ENS Cachan -- CNRS UMR 8536 (France)
- References: <20010705035944.A1779@netspace.net.au>
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