From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21496 invoked by alias); 6 Mar 2002 01:25:02 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 21272 invoked from network); 6 Mar 2002 01:24:57 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 6 Mar 2002 01:24:57 -0000 Received: from taarna.cygnus.com (taarna.cygnus.com [205.180.230.102]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id RAA25778; Tue, 5 Mar 2002 17:24:54 -0800 (PST) Received: (bkoz@localhost) by taarna.cygnus.com (SMI-8.6/8.6.4) id RAA08036; Tue, 5 Mar 2002 17:24:54 -0800 Date: Tue, 05 Mar 2002 17:25:00 -0000 From: Benjamin Kosnik X-Sender: bkoz@taarna.cygnus.com To: Richard Henderson cc: gcc@gcc.gnu.org, libstdc++@gcc.gnu.org Subject: Re: Results for g++ 3.1 application testing on i686-pc-linux-gnu In-Reply-To: <20020305150323.C7725@redhat.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-03/txt/msg00165.txt.bz2 > 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 wasn't const... :) 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. -benjamin