From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16462 invoked by alias); 23 Dec 2002 20:26:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 16441 invoked by uid 71); 23 Dec 2002 20:26:01 -0000 Resent-Date: 23 Dec 2002 20:26:01 -0000 Resent-Message-ID: <20021223202601.16440.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, jmc@xisl.com Received: (qmail 15868 invoked by uid 61); 23 Dec 2002 20:24:35 -0000 Message-Id: <20021223202435.15867.qmail@sources.redhat.com> Date: Mon, 23 Dec 2002 12:26:00 -0000 From: jmc@xisl.com Reply-To: jmc@xisl.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/9044: Incorrect error report about constant member not being initialised X-SW-Source: 2002-12/txt/msg01245.txt.bz2 List-Id: >Number: 9044 >Category: c++ >Synopsis: Incorrect error report about constant member not being initialised >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Mon Dec 23 12:26:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: John Collins >Release: g++-3.2 (GCC) 3.2 (OK with 2.96) >Organization: >Environment: Mandrake Linux 9.0 3.2-1mdk >Description: class class1 { public: int fld1; int fld2; }; class class2 { public: const unsigned type; int class1::*pmem; class2(const unsigned t, int class1::*aa) : type(t), pmem(aa) { } }; class2 inst1(0, &class1::fld1); class2 inst2(1, &class1::fld2); Compilation reports error 'uninitialized const member `class2::type' for the last two statements. Goes away if you remove the "pmem" member. >How-To-Repeat: >Fix: Remove "const" from members in class with pointer to member fields in. >Release-Note: >Audit-Trail: >Unformatted: