From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22886 invoked by alias); 7 Apr 2003 11:56: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 22793 invoked by uid 71); 7 Apr 2003 11:56:01 -0000 Resent-Date: 7 Apr 2003 11:56:01 -0000 Resent-Message-ID: <20030407115601.22792.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, Christian Ehrhardt Received: (qmail 18202 invoked by uid 48); 7 Apr 2003 11:50:29 -0000 Message-Id: <20030407115029.18201.qmail@sources.redhat.com> Date: Mon, 07 Apr 2003 11:56:00 -0000 From: Christian Ehrhardt Reply-To: Christian Ehrhardt To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c/10333: typeof (bitfield) is accepted but doesn't work X-SW-Source: 2003-04/txt/msg00252.txt.bz2 List-Id: >Number: 10333 >Category: c >Synopsis: typeof (bitfield) is accepted but doesn't work >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: accepts-illegal >Submitter-Id: net >Arrival-Date: Mon Apr 07 11:56:01 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Christian Ehrhardt >Release: 3.2,3.3,3.4 >Organization: >Environment: SunOS theseus 5.9 Generic_112233-03 sun4u sparc SUNW,Ultra-4 >Description: Using typeof on a bit field is accepted but it doesn't create a bit field. IMHO typeof should be treated the same as sizeof, i.e. it should not be allow on bit fields. Alternatively the following should create a global bit field y, but it in fact creates an unsigned int y: struct { unsigned int a:3; } x; typeof (x.a) y; int main () { y = 100; printf ("%d %d\n", y, sizeof (y)); } regards Christian >How-To-Repeat: See description. >Fix: >Release-Note: >Audit-Trail: >Unformatted: