From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8839 invoked by alias); 13 Oct 2002 09:06:03 -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 8820 invoked by uid 71); 13 Oct 2002 09:06:02 -0000 Resent-Date: 13 Oct 2002 09:06:02 -0000 Resent-Message-ID: <20021013090602.8819.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, wwieser@gmx.de Received: (qmail 6916 invoked by uid 61); 13 Oct 2002 09:01:58 -0000 Message-Id: <20021013090158.6915.qmail@sources.redhat.com> Date: Sun, 13 Oct 2002 02:06:00 -0000 From: wwieser@gmx.de Reply-To: wwieser@gmx.de To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/8209: Failure to detect negative bit-field size (!) X-SW-Source: 2002-10/txt/msg00522.txt.bz2 List-Id: >Number: 8209 >Category: c++ >Synopsis: Failure to detect negative bit-field size (!) >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: accepts-illegal >Submitter-Id: net >Arrival-Date: Sun Oct 13 02:06:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: wwieser@gmx.de >Release: 3.2.1 20021007 (prerelease) and many more >Organization: >Environment: linux-elf >Description: The bug was verified to be still present in yesterday's CVS (Oct 12): If you compile the following code: struct A { int : (-1); }; you get the (correct) _error_ negative width in bit-field `A::' Now, if you compile struct A { int : (sizeof(int)-5); }; then you just get the _warning_ warning: width of `A::' exceeds its type which is incorrect. As a result, sizeof(A) turns out to be 536870912 (500Mb). >How-To-Repeat: Just compile the four-liner above. >Fix: Should be fairly trivial, but I don't know. >Release-Note: >Audit-Trail: >Unformatted: