This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Strongly typed enums as bit fields
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Владимир Андреев <volodya at netfolder dot ru>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Sun, 20 Nov 2011 14:04:25 +0000
- Subject: Re: Strongly typed enums as bit fields
- References: <CAJXPUYLcHEO5rMjF+BJK+5oHOePvMj8zxDU7SGZP=RezL8uR1A@mail.gmail.com> <CAJXPUYJT=bZdvJ5LPVna-Kvh8K2W5yLBSBX98-9=0oGWWczJyw@mail.gmail.com>
2011/11/20 ÐÐÐÐÐÐÐÑ ÐÐÐÑÐÐÐ:
>
> C:\MinGW\bin>gcc E:/Test/Main.cpp -o E:/Test/Out.exe -std=c++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-ïeld shall have
integral or enumeration type (3.9.1)."
Please report it to bugzilla, thanks.