From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14154 invoked by alias); 26 Jan 2002 02:10:45 -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 14077 invoked from network); 26 Jan 2002 02:10:43 -0000 Received: from unknown (HELO boden.synopsys.com) (204.176.20.19) by sources.redhat.com with SMTP; 26 Jan 2002 02:10:43 -0000 Received: from crone.synopsys.com (crone.synopsys.com [146.225.7.23]) by boden.synopsys.com (Postfix) with ESMTP id DD322DAC3; Fri, 25 Jan 2002 18:10:42 -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 SAA26036; Fri, 25 Jan 2002 18:10:20 -0800 (PST) From: Joe Buck Received: (from jbuck@localhost) by atrus.synopsys.com (8.9.3+Sun/8.9.1) id SAA28620; Fri, 25 Jan 2002 18:10:41 -0800 (PST) Message-Id: <200201260210.SAA28620@atrus.synopsys.com> Subject: Re: g++ and aliasing bools To: dann@godzilla.ics.uci.edu (Dan Nicolaescu) Date: Fri, 25 Jan 2002 20:22:00 -0000 Cc: mark@codesourcery.com (Mark Mitchell), dan@dberlin.org (Daniel Berlin), gcc@gcc.gnu.org (gcc@gcc.gnu.org) In-Reply-To: <200201251457.aa26266@gremlin-relay.ics.uci.edu> from "Dan Nicolaescu" at Jan 25, 2002 02:57:16 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/msg01725.txt.bz2 > I bootstrapped this version on sparc-sun-solaris2.8: > > { > if (AGGREGATE_TYPE_P (t) && > !((TREE_CODE (t) == RECORD_TYPE) > && !CLASSTYPE_NON_POD_P(t) > && !CLASSTYPE_N_BASECLASSES(t))) > return 0; > } CLASSNAME_NON_POD_P returns false if there are any methods or if there is a constructor or destructor, right? If so, then I think we're going to get little gain: much of the payoff from better aliasing in C++ will come if we don't get false aliasing complaints for things like STL iterators. At least in my code, I don't have many NON_PODs; even if it's a plain struct otherwise, I use a constructor to initialize it. On the other hand, some of the STL iterators are derived classes. Sigh.