From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14642 invoked by alias); 10 Jun 2009 15:51:28 -0000 Received: (qmail 14632 invoked by uid 22791); 10 Jun 2009 15:51:27 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-ew0-f205.google.com (HELO mail-ew0-f205.google.com) (209.85.219.205) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 10 Jun 2009 15:51:22 +0000 Received: by ewy1 with SMTP id 1so1162209ewy.8 for ; Wed, 10 Jun 2009 08:51:19 -0700 (PDT) Received: by 10.210.42.20 with SMTP id p20mr1805404ebp.92.1244649079284; Wed, 10 Jun 2009 08:51:19 -0700 (PDT) Received: from yakj.usersys.redhat.com (wlanconf-nat-pool-brq.redhat.com [62.40.79.65]) by mx.google.com with ESMTPS id 10sm77473eyz.11.2009.06.10.08.51.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 10 Jun 2009 08:51:18 -0700 (PDT) Message-ID: <4A2FD669.5040905@gmail.com> Date: Wed, 10 Jun 2009 15:51:00 -0000 From: Paolo Bonzini User-Agent: Thunderbird 2.0.0.17 (X11/20081009) MIME-Version: 1.0 To: Ian Lance Taylor CC: gcc@gcc.gnu.org Subject: Re: skip_evaluation References: <4A2FD0FE.8090508@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-06/txt/msg00250.txt.bz2 >> struct B {}; >> struct D : public B { >> static const int i = sizeof((B*)(D*)0); >> }; >> >> struct Z {}; >> struct A : Z {}; >> Z* implicitToZ (Z*); >> struct B : A { >> static const int i = sizeof(implicitToZ((B*)0)); >> }; >> >> struct B {}; >> struct D; >> D* p; >> struct D: public B { >> static const int i = sizeof ((B*)p); >> }; >> >> (see PR27177). All of these would still be forbidden within (0?x:y). > > OK, but should they perhaps give an error which would perhaps not be > given if skip_evaluation is true? build_cp_class does not give errors after it tests skip_evaluation. The constant-expression errors are given in the parsers. Paolo