From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17719 invoked by alias); 20 Nov 2011 18:17:31 -0000 Received: (qmail 17703 invoked by uid 22791); 20 Nov 2011 18:17:30 -0000 X-SWARE-Spam-Status: No, hits=-0.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-ww0-f51.google.com (HELO mail-ww0-f51.google.com) (74.125.82.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 20 Nov 2011 18:17:14 +0000 Received: by wwe6 with SMTP id 6so7710250wwe.8 for ; Sun, 20 Nov 2011 10:17:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.180.91.8 with SMTP id ca8mr10830403wib.22.1321813032864; Sun, 20 Nov 2011 10:17:12 -0800 (PST) Received: by 10.216.120.204 with HTTP; Sun, 20 Nov 2011 10:17:12 -0800 (PST) In-Reply-To: References: Date: Mon, 21 Nov 2011 04:38:00 -0000 Message-ID: Subject: Re: Strongly typed enums as bit fields From: =?UTF-8?B?0JLQu9Cw0LTQuNC80LjRgCDQkNC90LTRgNC10LXQsg==?= To: Jonathan Wakely Cc: gcc-help@gcc.gnu.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-11/txt/msg00210.txt.bz2 Today I have tested Intel C++ Compiler - that is OK. Additionally I noted, that GCC doesn't support declaration like using NewType =3D OldType; which semantically equals to typedef OldType NewType; 2011/11/20 Jonathan Wakely : > 2011/11/20 =D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D0=BC=D0=B8=D1=80 =D0=90=D0=BD= =D0=B4=D1=80=D0=B5=D0=B5=D0=B2: >> >> C:\MinGW\bin>gcc E:/Test/Main.cpp -o E:/Test/Out.exe -std=3Dc++0x >> E:/Test/Main.cpp:9:18: error: bit-field 'Field1' with non-integral type >> >> MSVC 11.0 normally processes this program. >> >> Why GCC throws this error and MCVC doesn't? > > I think this should be valid, the standard says "A bit-=EF=AC=81eld shall= have > integral or enumeration type (3.9.1)." > > Please report it to bugzilla, thanks. > --=20 =D0=A1 =D1=83=D0=B2=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5=D0=BC, =D0=92=D0=BB= =D0=B0=D0=B4=D0=B8=D0=BC=D0=B8=D1=80