From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11061 invoked by alias); 10 Sep 2006 22:04:13 -0000 Received: (qmail 11010 invoked by uid 48); 10 Sep 2006 22:04:05 -0000 Date: Sun, 10 Sep 2006 22:04:00 -0000 Message-ID: <20060910220405.11009.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/27177] [4.0/4.1/4.2 Regression] ICE in build_simple_base_path, at cp/class.c:474 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "mmitchel at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-09/txt/msg00837.txt.bz2 List-Id: ------- Comment #10 from mmitchel at gcc dot gnu dot org 2006-09-10 22:04 ------- I am not convinced that the code in Comment #8 is valid. Although the operand of sizeof is not in fact evaluated, it seems odd to permit an operand which cannot, even in principle, be evaluated. This is not even a case in which evaluating the operand would lead to undefined behavior; there is simply no way to evaluate the operand at all. If there is an implicit conversion from B* to Z* at this point, then we must know how to performn the conversion, but we cannot, since B is not complete. Are you arguing that in: struct B {}; struct D : public B { static const int i = sizeof((B*)(D*)0); }; the conversion from D* to B* is a static_cast? Has anyone asked about this case on the core reflector? -- mmitchel at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |WAITING http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27177