This is the mail archive of the
mailing list for the GCC project.
Re: Results for g++ 3.1 application testing on i686-pc-linux-gnu
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Tue, 5 Mar 2002 17:24:53 -0800 (PST)
- Subject: Re: Results for g++ 3.1 application testing on i686-pc-linux-gnu
> I thought C++ allowed us to never emit these unless their
> address is taken? If that's the case, I'd consider this
> a (qoi) bug.
Well, for "C" there is always making -fno-common the default, if it
I'm not quite sure of C++ linkage rules for const ints. Jason's away, so
perhaps somebody else can weigh in. To me, this seems to be clearly
internal linkage, and thus able to be optimized.
>From 3.5, linkage:
* When a name has internal linkage, the entity it denotes can be
referred to by names from other scopes in the same translation unit.
* an object or reference that is explicitly declared const and
neither explicitly declared extern nor previously declared to have
external linkage; or
Perhaps I'm missing something.
FWIW, icc also does this, but it's not in read-only...
00000000 d i
So, who knows. If there is no clear consensus on this from the
compiler-folk within a couple days, I think the thing to do is make the
source code changes to enums so that application testing can proceed.