From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24922 invoked by alias); 12 Oct 2004 22:59:53 -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 24914 invoked from network); 12 Oct 2004 22:59:52 -0000 Received: from unknown (HELO mail.codesourcery.com) (65.74.133.10) by sourceware.org with SMTP; 12 Oct 2004 22:59:52 -0000 Received: (qmail 22339 invoked from network); 12 Oct 2004 22:57:56 -0000 Received: from taltos.codesourcery.com (zack@66.92.218.83) by mail.codesourcery.com with DES-CBC3-SHA encrypted SMTP; 12 Oct 2004 22:57:56 -0000 Received: by taltos.codesourcery.com (sSMTP sendmail emulation); Tue, 12 Oct 2004 15:57:56 -0700 To: Gabriel Dos Reis Cc: Geoffrey Keating , Ranjit Mathew , GCC Subject: Re: Compiling GCC With a C++ Compiler (g++) References: <416B89F2.1030606@gmail.com> From: Zack Weinberg Date: Tue, 12 Oct 2004 23:23:00 -0000 In-Reply-To: (Gabriel Dos Reis's message of "12 Oct 2004 15:03:33 -0500") Message-ID: <87brf735or.fsf@codesourcery.com> User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-10/txt/msg00468.txt.bz2 Gabriel Dos Reis writes: > Geoffrey Keating writes: > | The 'const' is there to indicate that the string should not be changed > | once the STRING_CST is created; > > And how do you create it? By casting away the const, as is done in build_string. Or by constructing the data in memory before giving it the type with the const qualifier. How else do you propose to enforce write-once semantics on a data structure that is, in fact, write-once? I am definitely with Geoff here - this should be allowed (or, to rephrase, if C++ has no construct which allows what we want to do here, that is a language deficiency). zw