From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26398 invoked by alias); 24 Feb 2003 23:16:01 -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 26356 invoked by uid 71); 24 Feb 2003 23:16:01 -0000 Resent-Date: 24 Feb 2003 23:16:01 -0000 Resent-Message-ID: <20030224231601.26355.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, hg@technosis.de Received: (qmail 23693 invoked by uid 48); 24 Feb 2003 23:13:48 -0000 Message-Id: <20030224231348.23689.qmail@sources.redhat.com> Date: Mon, 24 Feb 2003 23:16:00 -0000 From: hg@technosis.de Reply-To: hg@technosis.de To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/9842: Compile error when accessing a bitfield base class member X-SW-Source: 2003-02/txt/msg01302.txt.bz2 List-Id: >Number: 9842 >Category: c++ >Synopsis: Compile error when accessing a bitfield base class member >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: ice-on-legal-code >Submitter-Id: net >Arrival-Date: Mon Feb 24 23:16:01 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Heiko Gerdau >Release: gcc version 3.2 >Organization: >Environment: SuSe Linux 8.1 (with gcc 3.2) or W2k with mingw-gcc 3.2.2 >Description: Using the attached code gcc returns the following error: hg@linux:~> gcc -o bf.exe bf.cpp bf.cpp: In member function `void B::f()': bf.cpp:11: illegal pointer to bit-field `A::ib' It should be possible to access a base class member, even if it's a bitfield. The file bf.cpp contains the following code: class A { public: unsigned int ib:1; }; class B : public A { public: unsigned int ib; void f(){ A::ib=1;} }; int main() { B b; b.f(); return (0); } >How-To-Repeat: Just copy the code given above to bf.cpp and run gcc -o bf.exe bf.cpp >Fix: >Release-Note: >Audit-Trail: >Unformatted: