From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23608 invoked by alias); 29 Jan 2002 01:11:09 -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 23576 invoked from network); 29 Jan 2002 01:11:09 -0000 Received: from unknown (HELO boden.synopsys.com) (204.176.20.19) by sources.redhat.com with SMTP; 29 Jan 2002 01:11:09 -0000 Received: from crone.synopsys.com (crone.synopsys.com [146.225.7.23]) by boden.synopsys.com (Postfix) with ESMTP id 689C9DC6B; Mon, 28 Jan 2002 17:11:09 -0800 (PST) Received: from atrus.synopsys.com (localhost [127.0.0.1]) by crone.synopsys.com (8.9.3+Sun/8.9.1) with ESMTP id RAA09934; Mon, 28 Jan 2002 17:10:39 -0800 (PST) From: Joe Buck Received: (from jbuck@localhost) by atrus.synopsys.com (8.9.3+Sun/8.9.1) id RAA11199; Mon, 28 Jan 2002 17:11:02 -0800 (PST) Message-Id: <200201290111.RAA11199@atrus.synopsys.com> Subject: Re: g++ and aliasing bools To: mark@codesourcery.com (Mark Mitchell) Date: Mon, 28 Jan 2002 18:50:00 -0000 Cc: jbuck@synopsys.COM (Joe Buck), dan@dberlin.org (Daniel Berlin), neil@daikokuya.demon.co.uk (Neil Booth), pcarlini@unitus.it (Paolo Carlini), gcc@gcc.gnu.org (gcc@gcc.gnu.org) In-Reply-To: <15900000.1012262874@gandalf.codesourcery.com> from "Mark Mitchell" at Jan 28, 2002 04:07:54 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-01/txt/msg01854.txt.bz2 > > The basic argument is this: I am allowed to implement C++ in a way that > > zero-sized classes don't exist (they always come out as at least one > > byte). For such implementations I can clearly use the C rules, as there > > is an equivalent C program. If I then replace the inefficient > > [Implicitly, we're still in the simple_enough case here, i.e., no virtuals, > etc. Perhaps the argument applies more generally, but we don't know yet.] > OK, you've convinced me to extend simple_enough to the cases with > zero-sized thingies, so long as the other conditions still hold. We can handle inheritance as well if the zero-sized object is OK, since the C translation is to make the base class look like a member of the derived class. This will allow us to do better on most STL iterators; many are derived classes but they have no virtual functions.